public class LongTermsAggregator extends TermsAggregator
TermsAggregator.BucketCountThresholds Aggregator.BucketAggregationMode , Aggregator.Parser , Aggregator.SubAggCollectionMode BucketCollector.BucketAnalysisCollector | Modifier and Type | Field and Description |
|---|---|
protected LongHash |
bucketOrds
|
protected ValueFormatter |
formatter
|
protected ValuesSource |
valuesSource
|
aggsUsedForSorting, bucketCountThresholds, order, subAggCollectModebigArrays, bucketAggregationMode, COLLECT_MODE, collectableSubAggregators, context, depth, estimatedBucketCount, factories, name, parent, subAggregatorsNO_OP_COLLECTOR| Constructor and Description |
|---|
LongTermsAggregator(String
|
| Modifier and Type | Method and Description |
|---|---|
InternalAggregation |
buildAggregation(long owningBucketOrdinal)
|
InternalAggregation |
buildEmptyAggregation()
|
void |
collect(int doc, long owningBucketOrdinal)
Called during the query phase, to collect & aggregate the given document.
|
void |
doClose()
Release instance-specific data.
|
protected org |
getValues(ValuesSource
|
void |
setNextReader(org
|
boolean |
shouldCollect()
|
shouldDeferbucketAggregations, bucketDocCount, bucketEmptyAggregations, close, collectBucket, collectBucketNoCounts, collectExistingBucket, getDocCounts, incrementBucketDocCount, maxBucketOrdbucketAggregationMode, buildEmptySubAggregations, context, depth, doPostCollection, estimatedBucketCount, gatherAnalysis, hasParentBucketAggregator, name, parent, postCollection, preCollection, runDeferredCollections, subAggregator, subAggregatorswrapprotected final ValuesSource.Numeric valuesSource
@Nullable protected final ValueFormatterformatter
protected final LongHashbucketOrds
public LongTermsAggregator(Stringname, AggregatorFactories factories, ValuesSource .Numeric valuesSource, @Nullable ValueFormat format, long estimatedBucketCount, Terms .Order order, TermsAggregator .BucketCountThresholds bucketCountThresholds, AggregationContext aggregationContext, Aggregator parent, Aggregator .SubAggCollectionMode subAggCollectMode, boolean showTermDocCountError, IncludeExclude .LongFilter longFilter)
public boolean shouldCollect()
shouldCollect in class
Aggregator
protected org.apache .lucene .index .SortedNumericDocValues getValues(ValuesSource .Numeric valuesSource)
public void setNextReader(org.apache .lucene .index .AtomicReaderContext reader)
public void collect(int doc,
long owningBucketOrdinal)
throws IOException
BucketCollector
collect in class
BucketCollector
owningBucketOrdinal - The ordinal of the bucket this aggregator belongs to, assuming this aggregator is not a top level aggregator. Typically, aggregators with
#bucketAggregationMode set to
Aggregator.BucketAggregationMode.MULTI_BUCKETS will heavily depend on this ordinal. Other aggregators may or may not use it and can see this ordinal as just an extra information for the aggregation context. For top level aggregators, the ordinal will always be equal to 0.
IOException -
public InternalAggregationbuildAggregation(long owningBucketOrdinal)
buildAggregation in class
Aggregator
public InternalAggregationbuildEmptyAggregation()
public void doClose()
Aggregator