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
-
Fields inherited from class org.elasticsearch.search.aggregations.AggregatorFactory
factories, metaData, name, parent, queryShardContext
-
-
Constructor Summary
Constructors Constructor Description DateHistogramAggregatorFactory(String name, ValuesSourceConfig<ValuesSource> config, long offset, BucketOrder order, boolean keyed, long minDocCount, Rounding rounding, Rounding shardRounding, ExtendedBounds extendedBounds, QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String,Object> metaData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AggregatorcreateUnmapped(SearchContext searchContext, Aggregator parent, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData)protected AggregatordoCreateInternal(ValuesSource valuesSource, SearchContext searchContext, Aggregator parent, boolean collectsFromSingleBucket, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData)longminDocCount()protected ValuesSourceresolveMissingAny(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(String name, ValuesSourceConfig<ValuesSource> config, long offset, BucketOrder order, boolean keyed, long minDocCount, Rounding rounding, Rounding shardRounding, ExtendedBounds extendedBounds, QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String,Object> metaData) throws IOException
- Throws:
IOException
-
-
Method Detail
-
minDocCount
public long minDocCount()
-
resolveMissingAny
protected ValuesSource resolveMissingAny(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, SearchContext searchContext, Aggregator parent, boolean collectsFromSingleBucket, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData) throws IOException
- Specified by:
doCreateInternalin classValuesSourceAggregatorFactory<ValuesSource>- Throws:
IOException
-
createUnmapped
protected Aggregator createUnmapped(SearchContext searchContext, Aggregator parent, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData) throws IOException
- Specified by:
createUnmappedin classValuesSourceAggregatorFactory<ValuesSource>- Throws:
IOException
-
-