Class DateHistogramAggregatorFactory
- java.lang.Object
-
- org.elasticsearch.search.aggregations.AggregatorFactory
-
- org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory<ValuesSource>
-
- org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregatorFactory
-
public final class DateHistogramAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.AggregatorFactory
AggregatorFactory.MultiBucketAggregatorWrapper
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory
config
-
-
Constructor Summary
Constructors Constructor Description DateHistogramAggregatorFactory(java.lang.String name, ValuesSourceConfig<ValuesSource> config, long offset, BucketOrder order, boolean keyed, long minDocCount, Rounding rounding, Rounding shardRounding, ExtendedBounds extendedBounds, SearchContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metaData)
-
Method Summary
Modifier and Type Method Description protected AggregatorcreateUnmapped(Aggregator parent, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData)protected AggregatordoCreateInternal(ValuesSource valuesSource, Aggregator parent, boolean collectsFromSingleBucket, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData)longminDocCount()protected ValuesSourceresolveMissingAny(java.lang.Object missing)This method provides a hook for aggregations that need finer grained control over the ValuesSource selected when the user supplies a missing value and there is no mapped field to infer the type from.-
Methods inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory
createInternal
-
Methods inherited from class org.elasticsearch.search.aggregations.AggregatorFactory
asMultiBucketAggregator, create, doValidate, getParent, name
-
-
-
-
Constructor Detail
-
DateHistogramAggregatorFactory
public DateHistogramAggregatorFactory(java.lang.String name, ValuesSourceConfig<ValuesSource> config, long offset, BucketOrder order, boolean keyed, long minDocCount, Rounding rounding, Rounding shardRounding, ExtendedBounds extendedBounds, SearchContext context, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metaData) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
minDocCount
public long minDocCount()
-
resolveMissingAny
protected ValuesSource resolveMissingAny(java.lang.Object missing)
Description copied from class:ValuesSourceAggregatorFactoryThis method provides a hook for aggregations that need finer grained control over the ValuesSource selected when the user supplies a missing value and there is no mapped field to infer the type from. This will only be called for aggregations that specify the ValuesSourceType.ANY in their constructors (On the builder class). The user supplied object is passed as a parameter, so its type may be inspected as needed. Generally, only the type of the returned ValuesSource is used, so returning the EMPTY instance of the chosen type is recommended.- Overrides:
resolveMissingAnyin classValuesSourceAggregatorFactory<ValuesSource>- Parameters:
missing- The user supplied missing value- Returns:
- A ValuesSource instance compatible with the supplied parameter
-
doCreateInternal
protected Aggregator doCreateInternal(ValuesSource valuesSource, Aggregator parent, boolean collectsFromSingleBucket, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData) throws java.io.IOException
- Specified by:
doCreateInternalin classValuesSourceAggregatorFactory<ValuesSource>- Throws:
java.io.IOException
-
createUnmapped
protected Aggregator createUnmapped(Aggregator parent, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData) throws java.io.IOException
- Specified by:
createUnmappedin classValuesSourceAggregatorFactory<ValuesSource>- Throws:
java.io.IOException
-
-