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, subAggregatorsFields inherited from class org.elasticsearch.search.aggregations.BucketCollector
NO_OP_COLLECTOR -
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 abstract InternalAggregationbuildAggregation(long owningBucketOrd)Build an aggregation for data that has been collected intoowningBucketOrd.InternalAggregation[]buildAggregations(long[] owningBucketOrds)Build the results of this aggregation.Methods inherited from class org.elasticsearch.search.aggregations.AggregatorBase
addRequestCircuitBreakerBytes, bigArrays, buildEmptySubAggregations, close, doClose, doPostCollection, doPreCollection, getLeafCollector, getLeafCollector, metadata, name, parent, pointReaderIfAvailable, postCollection, preCollection, preGetSubLeafCollectors, scoreMode, searcher, subAggregator, subAggregators, topLevelQuery, toStringMethods inherited from class org.elasticsearch.search.aggregations.Aggregator
bucketComparator, buildEmptyAggregation, buildTopLevel, collectDebugInfo, resolveSortPath, resolveSortPathOnValidAggMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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
-
buildAggregation
public abstract InternalAggregation buildAggregation(long owningBucketOrd) throws java.io.IOExceptionBuild an aggregation for data that has been collected intoowningBucketOrd.- Throws:
java.io.IOException
-
buildAggregations
public final InternalAggregation[] buildAggregations(long[] owningBucketOrds) throws java.io.IOExceptionDescription 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
-