Class HistogramAggregatorFactory
java.lang.Object
org.elasticsearch.search.aggregations.AggregatorFactory
org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory
org.elasticsearch.search.aggregations.bucket.histogram.HistogramAggregatorFactory
public final class HistogramAggregatorFactory extends ValuesSourceAggregatorFactory
Constructs the per-shard aggregator instance for histogram aggregation. Selects the numeric or range field implementation based on the
field type.
-
Field Summary
Fields inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory
config
-
Constructor Summary
Constructors Constructor Description HistogramAggregatorFactory(java.lang.String name, ValuesSourceConfig config, double interval, double offset, BucketOrder order, boolean keyed, long minDocCount, DoubleBounds extendedBounds, DoubleBounds hardBounds, AggregationContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metadata, HistogramAggregatorSupplier aggregatorSupplier)
-
Method Summary
Modifier and Type Method Description protected Aggregator
createUnmapped(Aggregator parent, java.util.Map<java.lang.String,java.lang.Object> metadata)
Create the Aggregator for aValuesSource
that doesn't have values.protected Aggregator
doCreateInternal(Aggregator parent, CardinalityUpperBound cardinality, java.util.Map<java.lang.String,java.lang.Object> metadata)
Create the Aggregator for aValuesSource
that has values.long
minDocCount()
Methods inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory
createInternal, getStatsSubtype
Methods inherited from class org.elasticsearch.search.aggregations.AggregatorFactory
create, doValidate, getParent, name
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
HistogramAggregatorFactory
public HistogramAggregatorFactory(java.lang.String name, ValuesSourceConfig config, double interval, double offset, BucketOrder order, boolean keyed, long minDocCount, DoubleBounds extendedBounds, DoubleBounds hardBounds, AggregationContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metadata, HistogramAggregatorSupplier aggregatorSupplier) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Details
-
minDocCount
public long minDocCount() -
doCreateInternal
protected Aggregator doCreateInternal(Aggregator parent, CardinalityUpperBound cardinality, java.util.Map<java.lang.String,java.lang.Object> metadata) throws java.io.IOExceptionDescription copied from class:ValuesSourceAggregatorFactory
Create the Aggregator for aValuesSource
that has values.- Specified by:
doCreateInternal
in classValuesSourceAggregatorFactory
cardinality
- Upper bound of the number ofowningBucketOrd
s that theAggregator
created by this method will be asked to collect.- Throws:
java.io.IOException
-
createUnmapped
protected Aggregator createUnmapped(Aggregator parent, java.util.Map<java.lang.String,java.lang.Object> metadata) throws java.io.IOExceptionDescription copied from class:ValuesSourceAggregatorFactory
Create the Aggregator for aValuesSource
that doesn't have values.- Specified by:
createUnmapped
in classValuesSourceAggregatorFactory
- Throws:
java.io.IOException
-