Module org.elasticsearch.server
Class TermsAggregator
java.lang.Object
org.elasticsearch.search.aggregations.BucketCollector
org.elasticsearch.search.aggregations.Aggregator
org.elasticsearch.search.aggregations.AggregatorBase
org.elasticsearch.search.aggregations.bucket.BucketsAggregator
org.elasticsearch.search.aggregations.bucket.DeferableBucketAggregator
org.elasticsearch.search.aggregations.bucket.terms.TermsAggregator
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Releasable
- Direct Known Subclasses:
- GlobalOrdinalsStringTermsAggregator,- MapStringTermsAggregator,- NumericTermsAggregator
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class org.elasticsearch.search.aggregations.bucket.BucketsAggregatorBucketsAggregator.BucketBuilderForFixedCount<B>, BucketsAggregator.BucketBuilderForVariable<B>, BucketsAggregator.ResultBuilderForVariable<B>, BucketsAggregator.SingleBucketResultBuilderNested classes/interfaces inherited from class org.elasticsearch.search.aggregations.AggregatorAggregator.BucketComparator, Aggregator.Parser, Aggregator.SubAggCollectionMode
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final Set<Aggregator>protected final TermsAggregator.BucketCountThresholdsprotected final Aggregator.SubAggCollectionModeprotected final DocValueFormatprotected final BucketOrderprotected final Comparator<InternalTerms.Bucket<?>>Fields inherited from class org.elasticsearch.search.aggregations.bucket.BucketsAggregatordocCountProviderFields inherited from class org.elasticsearch.search.aggregations.AggregatorBasecollectableSubAggregators, DEFAULT_WEIGHT, name, parent, subAggregatorsFields inherited from class org.elasticsearch.search.aggregations.BucketCollectorNO_OP_BUCKET_COLLECTOR, NO_OP_COLLECTOR
- 
Constructor SummaryConstructorsConstructorDescriptionTermsAggregator(String name, AggregatorFactories factories, AggregationContext context, Aggregator parent, TermsAggregator.BucketCountThresholds bucketCountThresholds, BucketOrder order, DocValueFormat format, Aggregator.SubAggCollectionMode collectMode, Map<String, Object> metadata) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic Set<Aggregator>aggsUsedForSorting(Aggregator root, BucketOrder order) Walks through bucket order and extracts all aggregations used for sortingstatic booleanprotected booleanshouldDefer(Aggregator aggregator) This method should be overridden by subclasses that want to defer calculation of a child aggregation until a first pass is complete and a set of buckets has been pruned.Methods inherited from class org.elasticsearch.search.aggregations.bucket.DeferableBucketAggregatorbuildDeferringCollector, collectDebugInfo, deferringCollector, doPreCollection, prepareSubAggsMethods inherited from class org.elasticsearch.search.aggregations.bucket.BucketsAggregatorbucketComparator, bucketDocCount, buildAggregationsForFixedBucketCount, buildAggregationsForSingleBucket, buildAggregationsForVariableBuckets, buildSubAggsForAllBuckets, buildSubAggsForBuckets, buildSubAggsForBuckets, close, collectBucket, collectExistingBucket, descendsFromGlobalAggregator, getDocCounts, grow, incrementBucketDocCount, maxBucketOrd, preGetSubLeafCollectors, resolveSortPath, rewriteBucketsMethods inherited from class org.elasticsearch.search.aggregations.AggregatorBaseaddRequestCircuitBreakerBytes, bigArrays, buildEmptySubAggregations, doClose, doPostCollection, getLeafCollector, getLeafCollector, metadata, name, parent, pointReaderIfAvailable, postCollection, preCollection, scoreMode, searcher, subAggregator, subAggregators, topLevelQuery, toStringMethods inherited from class org.elasticsearch.search.aggregations.AggregatorbuildAggregations, buildEmptyAggregation, buildTopLevel, resolveSortPathOnValidAggMethods inherited from class org.elasticsearch.search.aggregations.BucketCollectorasCollector
- 
Field Details- 
format
- 
bucketCountThresholds
- 
order
- 
partiallyBuiltBucketComparator
- 
aggsUsedForSorting
- 
collectMode
 
- 
- 
Constructor Details- 
TermsAggregatorpublic TermsAggregator(String name, AggregatorFactories factories, AggregationContext context, Aggregator parent, TermsAggregator.BucketCountThresholds bucketCountThresholds, BucketOrder order, DocValueFormat format, Aggregator.SubAggCollectionMode collectMode, Map<String, Object> metadata) throws IOException- Throws:
- IOException
 
 
- 
- 
Method Details- 
aggsUsedForSortingWalks through bucket order and extracts all aggregations used for sorting
- 
descendsFromNestedAggregator
- 
shouldDeferDescription copied from class:DeferableBucketAggregatorThis method should be overridden by subclasses that want to defer calculation of a child aggregation until a first pass is complete and a set of buckets has been pruned.- Overrides:
- shouldDeferin class- DeferableBucketAggregator
- Parameters:
- aggregator- the child aggregator
- Returns:
- true if the aggregator should be deferred until a first pass at collection has completed
 
 
-