Class NumericHistogramAggregator
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
org.elasticsearch.search.aggregations.bucket.histogram.NumericHistogramAggregator
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,org.apache.lucene.search.Collector
,Releasable
public class NumericHistogramAggregator extends AbstractHistogramAggregator
An aggregator for numeric values. For a given
interval
,
offset
and value
, it returns the highest number that can be
written as interval * x + offset
and yet is less than or equal to
value
.-
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
Fields inherited from class org.elasticsearch.search.aggregations.bucket.histogram.AbstractHistogramAggregator
bucketOrds, extendedBounds, formatter, hardBounds, interval, keyed, minDocCount, offset, order
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
Constructors Constructor Description NumericHistogramAggregator(java.lang.String name, AggregatorFactories factories, double interval, double offset, BucketOrder order, boolean keyed, long minDocCount, DoubleBounds extendedBounds, DoubleBounds hardBounds, ValuesSourceConfig valuesSourceConfig, AggregationContext context, Aggregator parent, CardinalityUpperBound cardinalityUpperBound, java.util.Map<java.lang.String,java.lang.Object> metadata)
-
Method Summary
Modifier and Type Method Description LeafBucketCollector
getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx, LeafBucketCollector sub)
Get aLeafBucketCollector
for the given ctx, which should delegate to the given collector.org.apache.lucene.search.ScoreMode
scoreMode()
Most aggregators don't need scores, make sure to extend this method if your aggregator needs them.Methods inherited from class org.elasticsearch.search.aggregations.bucket.histogram.AbstractHistogramAggregator
buildAggregations, buildEmptyAggregation, collectDebugInfo, doClose
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, metadata, name, parent, pointReaderIfAvailable, postCollection, preCollection, searcher, subAggregator, subAggregators, topLevelQuery, toString
Methods inherited from class org.elasticsearch.search.aggregations.Aggregator
buildTopLevel, resolveSortPathOnValidAgg
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
NumericHistogramAggregator
public NumericHistogramAggregator(java.lang.String name, AggregatorFactories factories, double interval, double offset, BucketOrder order, boolean keyed, long minDocCount, DoubleBounds extendedBounds, DoubleBounds hardBounds, ValuesSourceConfig valuesSourceConfig, AggregationContext context, Aggregator parent, CardinalityUpperBound cardinalityUpperBound, java.util.Map<java.lang.String,java.lang.Object> metadata) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Details
-
scoreMode
public org.apache.lucene.search.ScoreMode scoreMode()Description copied from class:AggregatorBase
Most aggregators don't need scores, make sure to extend this method if your aggregator needs them.- Specified by:
scoreMode
in interfaceorg.apache.lucene.search.Collector
- Overrides:
scoreMode
in classAggregatorBase
-
getLeafCollector
public LeafBucketCollector getLeafCollector(org.apache.lucene.index.LeafReaderContext ctx, LeafBucketCollector sub) throws java.io.IOExceptionDescription copied from class:AggregatorBase
Get aLeafBucketCollector
for the given ctx, which should delegate to the given collector.- Specified by:
getLeafCollector
in classAggregatorBase
- Throws:
java.io.IOException
-