Class AbstractHistogramAggregator
java.lang.Object
org.elasticsearch.search.aggregations.BucketCollector
org.elasticsearch.search.aggregations.Aggregator
org.elasticsearch.search.aggregations.AggregatorBase
org.elasticsearch.search.aggregations.bucket.BucketsAggregator
org.elasticsearch.search.aggregations.bucket.histogram.AbstractHistogramAggregator
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.lucene.search.Collector
,org.elasticsearch.core.Releasable
- Direct Known Subclasses:
NumericHistogramAggregator
,RangeHistogramAggregator
Base class for functionality shared between aggregators for this
histogram
aggregation.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.bucket.BucketsAggregator
BucketsAggregator.BucketBuilderForFixedCount<B>, BucketsAggregator.BucketBuilderForVariable<B>, BucketsAggregator.ResultBuilderForVariable<B>, BucketsAggregator.SingleBucketResultBuilder
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.Aggregator
Aggregator.BucketComparator, Aggregator.Parser, Aggregator.SubAggCollectionMode
-
Field Summary
Modifier and TypeFieldDescriptionprotected LongKeyedBucketOrds
protected DoubleBounds
protected DocValueFormat
protected DoubleBounds
protected double
protected boolean
protected long
protected double
protected BucketOrder
Fields inherited from class org.elasticsearch.search.aggregations.bucket.BucketsAggregator
docCountProvider
Fields inherited from class org.elasticsearch.search.aggregations.AggregatorBase
collectableSubAggregators, DEFAULT_WEIGHT, name, parent, subAggregators
Fields inherited from class org.elasticsearch.search.aggregations.BucketCollector
NO_OP_COLLECTOR
-
Constructor Summary
ConstructorDescriptionAbstractHistogramAggregator(String name, AggregatorFactories factories, double interval, double offset, BucketOrder order, boolean keyed, long minDocCount, DoubleBounds extendedBounds, DoubleBounds hardBounds, DocValueFormat formatter, AggregationContext context, Aggregator parent, CardinalityUpperBound cardinalityUpperBound, Map<String,Object> metadata)
-
Method Summary
Modifier and TypeMethodDescriptionbuildAggregations(long[] owningBucketOrds)
Build the results of this aggregation.Build an empty aggregation.void
collectDebugInfo(BiConsumer<String,Object> add)
Collect debug information to add to the profiling results.void
doClose()
Release instance-specific data.Methods inherited from class org.elasticsearch.search.aggregations.bucket.BucketsAggregator
bucketComparator, bucketDocCount, buildAggregationsForFixedBucketCount, buildAggregationsForSingleBucket, buildAggregationsForVariableBuckets, buildSubAggsForAllBuckets, buildSubAggsForBuckets, buildSubAggsForBuckets, close, collectBucket, collectExistingBucket, descendsFromGlobalAggregator, getDocCounts, grow, incrementBucketDocCount, maxBucketOrd, preGetSubLeafCollectors, prepareSubAggs, resolveSortPath, rewriteBuckets
Methods inherited from class org.elasticsearch.search.aggregations.AggregatorBase
addRequestCircuitBreakerBytes, bigArrays, buildEmptySubAggregations, doPostCollection, doPreCollection, getLeafCollector, getLeafCollector, metadata, name, parent, pointReaderIfAvailable, postCollection, preCollection, scoreMode, searcher, subAggregator, subAggregators, topLevelQuery, toString
Methods inherited from class org.elasticsearch.search.aggregations.Aggregator
buildTopLevel, resolveSortPathOnValidAgg
-
Field Details
-
formatter
-
interval
protected final double interval -
offset
protected final double offset -
order
-
keyed
protected final boolean keyed -
minDocCount
protected final long minDocCount -
extendedBounds
-
hardBounds
-
bucketOrds
-
-
Constructor Details
-
AbstractHistogramAggregator
public AbstractHistogramAggregator(String name, AggregatorFactories factories, double interval, double offset, BucketOrder order, boolean keyed, long minDocCount, DoubleBounds extendedBounds, DoubleBounds hardBounds, DocValueFormat formatter, AggregationContext context, Aggregator parent, CardinalityUpperBound cardinalityUpperBound, Map<String,Object> metadata) throws IOException- Throws:
IOException
-
-
Method Details
-
buildAggregations
Description copied from class:Aggregator
Build the results of this aggregation.- Specified by:
buildAggregations
in 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:
IOException
-
buildEmptyAggregation
Description copied from class:Aggregator
Build an empty aggregation.- Specified by:
buildEmptyAggregation
in classAggregator
-
doClose
public void doClose()Description copied from class:AggregatorBase
Release instance-specific data.- Overrides:
doClose
in classAggregatorBase
-
collectDebugInfo
Description copied from class:Aggregator
Collect debug information to add to the profiling results. This will only be called if the aggregation is being profiled.Well behaved implementations will always call the superclass implementation just in case it has something interesting. They will also only add objects which can be serialized with
StreamOutput.writeGenericValue(Object)
andXContentBuilder.value(Object)
. And they'll have an integration test.- Overrides:
collectDebugInfo
in classAggregator
-