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
,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
ConstructorDescriptionStringTermsAggregatorFromFilters
(Aggregator parent, AggregatorFactories subAggregators, 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 InternalAggregation
adapt
(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, subAggregators
Methods inherited from class org.elasticsearch.search.aggregations.Aggregator
bucketComparator, buildTopLevel, resolveSortPath, resolveSortPathOnValidAgg
-
Constructor Details
-
StringTermsAggregatorFromFilters
public StringTermsAggregatorFromFilters(Aggregator parent, AggregatorFactories subAggregators, CheckedFunction<AggregatorFactories, FilterByFilterAggregator, throws IOExceptionIOException> delegate, boolean showTermDocCountError, DocValueFormat format, BucketOrder order, TermsAggregator.BucketCountThresholds bucketCountThresholds, org.apache.lucene.index.TermsEnum terms) - Throws:
IOException
-
-
Method Details
-
adapt
Description copied from class:AdaptingAggregator
Adapt the result from the collecting Aggregator into the result expected by this Aggregator.- Specified by:
adapt
in classAdaptingAggregator
- Throws:
IOException
-