Class StringTermsAggregatorFromFilters
java.lang.Object
org.elasticsearch.search.aggregations.BucketCollector
org.elasticsearch.search.aggregations.Aggregator
org.elasticsearch.search.aggregations.AdaptingAggregator
org.elasticsearch.search.aggregations.bucket.terms.StringTermsAggregatorFromFilters
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.lucene.search.Collector,org.elasticsearch.core.Releasable
Adapts a
terms aggregation into a filters aggregation.
Its possible that we could lovingly hand craft an Aggregator that
uses similar tricks that'd have lower memory overhead but generally we reach
for this when we know that there aren't many distinct values so it doesn't
have particularly high memory cost anyway. And we expect to be able to
further optimize the filters aggregation in more cases than a
special purpose terms aggregator.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.Aggregator
Aggregator.BucketComparator, Aggregator.Parser, Aggregator.SubAggCollectionMode -
Field Summary
Fields inherited from class org.elasticsearch.search.aggregations.BucketCollector
NO_OP_COLLECTOR -
Constructor Summary
ConstructorsConstructorDescriptionStringTermsAggregatorFromFilters(Aggregator parent, AggregatorFactories subAggregators, org.elasticsearch.core.CheckedFunction<AggregatorFactories,FilterByFilterAggregator,IOException> delegate, boolean showTermDocCountError, DocValueFormat format, BucketOrder order, TermsAggregator.BucketCountThresholds bucketCountThresholds, org.apache.lucene.index.TermsEnum terms) -
Method Summary
Modifier and TypeMethodDescriptionprotected InternalAggregationadapt(InternalAggregation delegateResult)Adapt the result from the collecting Aggregator into the result expected by this Aggregator.Methods inherited from class org.elasticsearch.search.aggregations.AdaptingAggregator
buildAggregations, buildEmptyAggregation, close, collectDebugInfo, delegate, getLeafCollector, name, parent, postCollection, preCollection, scoreMode, subAggregator, subAggregatorsMethods inherited from class org.elasticsearch.search.aggregations.Aggregator
bucketComparator, buildTopLevel, resolveSortPath, resolveSortPathOnValidAgg
-
Constructor Details
-
StringTermsAggregatorFromFilters
public StringTermsAggregatorFromFilters(Aggregator parent, AggregatorFactories subAggregators, org.elasticsearch.core.CheckedFunction<AggregatorFactories,FilterByFilterAggregator,IOException> delegate, boolean showTermDocCountError, DocValueFormat format, BucketOrder order, TermsAggregator.BucketCountThresholds bucketCountThresholds, org.apache.lucene.index.TermsEnum terms) throws IOException- Throws:
IOException
-
-
Method Details
-
adapt
Description copied from class:AdaptingAggregatorAdapt the result from the collecting Aggregator into the result expected by this Aggregator.- Specified by:
adaptin classAdaptingAggregator- Throws:
IOException
-