Class NonCollectingAggregator
java.lang.Object
org.elasticsearch.search.aggregations.BucketCollector
org.elasticsearch.search.aggregations.Aggregator
org.elasticsearch.search.aggregations.AggregatorBase
org.elasticsearch.search.aggregations.NonCollectingAggregator
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.lucene.search.Collector,Releasable
- Direct Known Subclasses:
RangeAggregator.Unmapped
public abstract class NonCollectingAggregator extends AggregatorBase
An aggregator that is not collected, this can typically be used when running an aggregation over a field that doesn't have
a mapping.
-
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.AggregatorBase
collectableSubAggregators, context, DEFAULT_WEIGHT, name, parent, subAggregators -
Constructor Summary
Constructors Modifier Constructor Description protectedNonCollectingAggregator(java.lang.String name, SearchContext context, Aggregator parent, java.util.Map<java.lang.String,java.lang.Object> metadata)Build a NonCollectingAggregator for an aggregator without sub-aggregators.protectedNonCollectingAggregator(java.lang.String name, SearchContext context, Aggregator parent, AggregatorFactories subFactories, java.util.Map<java.lang.String,java.lang.Object> metadata)Build a NonCollectingAggregator for any aggregator. -
Method Summary
Modifier and Type Method Description InternalAggregation[]buildAggregations(long[] owningBucketOrds)Build the results of this aggregation.LeafBucketCollectorgetLeafCollector(org.apache.lucene.index.LeafReaderContext reader, LeafBucketCollector sub)Get aLeafBucketCollectorfor the given ctx, which should delegate to the given collector.Methods inherited from class org.elasticsearch.search.aggregations.AggregatorBase
addRequestCircuitBreakerBytes, buildEmptySubAggregations, close, context, doClose, doPostCollection, doPreCollection, getLeafCollector, metadata, name, parent, pointReaderIfAvailable, postCollection, preCollection, preGetSubLeafCollectors, scoreMode, subAggregator, subAggregators, toStringMethods inherited from class org.elasticsearch.search.aggregations.Aggregator
bucketComparator, buildEmptyAggregation, buildTopLevel, collectDebugInfo, resolveSortPath, resolveSortPathOnValidAgg
-
Constructor Details
-
NonCollectingAggregator
protected NonCollectingAggregator(java.lang.String name, SearchContext context, Aggregator parent, AggregatorFactories subFactories, java.util.Map<java.lang.String,java.lang.Object> metadata) throws java.io.IOExceptionBuild a NonCollectingAggregator for any aggregator.- Throws:
java.io.IOException
-
NonCollectingAggregator
protected NonCollectingAggregator(java.lang.String name, SearchContext context, Aggregator parent, java.util.Map<java.lang.String,java.lang.Object> metadata) throws java.io.IOExceptionBuild a NonCollectingAggregator for an aggregator without sub-aggregators.- Throws:
java.io.IOException
-
-
Method Details
-
getLeafCollector
public final LeafBucketCollector getLeafCollector(org.apache.lucene.index.LeafReaderContext reader, LeafBucketCollector sub)Description copied from class:AggregatorBaseGet aLeafBucketCollectorfor the given ctx, which should delegate to the given collector.- Specified by:
getLeafCollectorin classAggregatorBase
-
buildAggregations
Description copied from class:AggregatorBuild the results of this aggregation.- Specified by:
buildAggregationsin classAggregator- Parameters:
owningBucketOrds- the ordinals of the buckets that we want to collect from this aggregation- Returns:
- the results for each ordinal, in the same order as the array of ordinals
- Throws:
java.io.IOException
-