Class MetricsAggregator
java.lang.Object
org.elasticsearch.search.aggregations.BucketCollector
org.elasticsearch.search.aggregations.Aggregator
org.elasticsearch.search.aggregations.AggregatorBase
org.elasticsearch.search.aggregations.metrics.MetricsAggregator
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.lucene.search.Collector,Releasable
- Direct Known Subclasses:
NumericMetricsAggregator
public abstract class MetricsAggregator extends AggregatorBase
-
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, DEFAULT_WEIGHT, name, parent, subAggregators -
Constructor Summary
Constructors Modifier Constructor Description protectedMetricsAggregator(java.lang.String name, AggregationContext context, Aggregator parent, java.util.Map<java.lang.String,java.lang.Object> metadata) -
Method Summary
Modifier and Type Method Description protected voidbeforeBuildingResults(long[] ordsToCollect)Called once before any calls tobuildAggregation(long)so the Aggregator can finish up any work it has to do.abstract InternalAggregationbuildAggregation(long ordToCollect)Build an aggregation for data that has been collected intoowningBucketOrd.InternalAggregation[]buildAggregations(long[] ordsToCollect)Build the results of this aggregation.Methods inherited from class org.elasticsearch.search.aggregations.AggregatorBase
addRequestCircuitBreakerBytes, bigArrays, buildEmptySubAggregations, close, doClose, doPreCollection, getLeafCollector, getLeafCollector, metadata, name, parent, pointReaderIfAvailable, preCollection, preGetSubLeafCollectors, scoreMode, searcher, subAggregator, subAggregators, topLevelQuery, toStringMethods inherited from class org.elasticsearch.search.aggregations.Aggregator
bucketComparator, buildEmptyAggregation, buildTopLevel, collectDebugInfo, resolveSortPath, resolveSortPathOnValidAgg
-
Constructor Details
-
MetricsAggregator
protected MetricsAggregator(java.lang.String name, AggregationContext context, Aggregator parent, java.util.Map<java.lang.String,java.lang.Object> metadata) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Details
-
beforeBuildingResults
protected void beforeBuildingResults(long[] ordsToCollect) throws java.io.IOExceptionCalled once before any calls tobuildAggregation(long)so the Aggregator can finish up any work it has to do.- Throws:
java.io.IOException
-
buildAggregation
Build an aggregation for data that has been collected intoowningBucketOrd.- Throws:
java.io.IOException
-
buildAggregations
public final InternalAggregation[] buildAggregations(long[] ordsToCollect) throws java.io.IOExceptionDescription copied from class:AggregatorBuild the results of this aggregation.- Specified by:
buildAggregationsin classAggregator- Parameters:
ordsToCollect- 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
-