public class DateHistogramBuilder extends ValuesSourceAggregationBuilder<DateHistogramBuilder>
DateHistogram
aggregation.ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
type
EMPTY_PARAMS
Constructor and Description |
---|
DateHistogramBuilder(String name)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
protected XContentBuilder |
doInternalXContent(XContentBuilder builder,
ToXContent.Params params) |
DateHistogramBuilder |
extendedBounds(org.joda.time.DateTime min,
org.joda.time.DateTime max)
Set extended bounds for the histogram.
|
DateHistogramBuilder |
extendedBounds(Long min,
Long max)
Set extended bounds for the histogram.
|
DateHistogramBuilder |
extendedBounds(String min,
String max)
Set extended bounds for the histogram.
|
DateHistogramBuilder |
factor(float factor)
Set a factor to apply to values of the field, typically used if times
are stored in seconds instead of milliseconds.
|
DateHistogramBuilder |
format(String format)
Set the format to use for dates.
|
DateHistogramBuilder |
interval(DateHistogram.Interval interval)
Set the interval.
|
DateHistogramBuilder |
interval(long interval)
Set the interval in milliseconds.
|
DateHistogramBuilder |
minDocCount(long minDocCount)
Set the minimum document count per bucket.
|
DateHistogramBuilder |
offset(String offset)
Set the offset that is applied to computed bucket boundaries.
|
DateHistogramBuilder |
order(Histogram.Order order)
Set the order by which the buckets will be returned.
|
DateHistogramBuilder |
postOffset(String postOffset)
Deprecated.
the postOffset option will be replaced by offset in future version.
|
DateHistogramBuilder |
postZone(String postZone)
Deprecated.
this option is going to be removed in 2.0 releases
|
DateHistogramBuilder |
preOffset(String preOffset)
Deprecated.
the preOffset option will be replaced by offset in future version.
|
DateHistogramBuilder |
preZone(String preZone)
Deprecated.
use timeZone() instead
|
DateHistogramBuilder |
preZoneAdjustLargeInterval(boolean preZoneAdjustLargeInterval)
Deprecated.
this option is going to be removed in 2.0 releases
|
DateHistogramBuilder |
timeZone(String timeZone)
Set the time zone in which to translate dates before computing buckets.
|
field, internalXContent, lang, param, params, script
subAggregation, subAggregation, subAggregation, subAggregation, subAggregation, subAggregation, toXContent
getName
public DateHistogramBuilder(String name)
public DateHistogramBuilder interval(long interval)
public DateHistogramBuilder interval(DateHistogram.Interval interval)
public DateHistogramBuilder order(Histogram.Order order)
public DateHistogramBuilder minDocCount(long minDocCount)
@Deprecated public DateHistogramBuilder preZone(String preZone)
@Deprecated public DateHistogramBuilder postZone(String postZone)
public DateHistogramBuilder timeZone(String timeZone)
@Deprecated public DateHistogramBuilder preZoneAdjustLargeInterval(boolean preZoneAdjustLargeInterval)
@Deprecated public DateHistogramBuilder preOffset(String preOffset)
@Deprecated public DateHistogramBuilder postOffset(String postOffset)
public DateHistogramBuilder offset(String offset)
public DateHistogramBuilder factor(float factor)
public DateHistogramBuilder format(String format)
public DateHistogramBuilder extendedBounds(Long min, Long max)
min
or the upper value would
be less than max
, empty buckets will be generated.public DateHistogramBuilder extendedBounds(String min, String max)
min
or the upper value would
be less than max
, empty buckets will be generated.public DateHistogramBuilder extendedBounds(org.joda.time.DateTime min, org.joda.time.DateTime max)
min
or the upper value would
be less than max
, empty buckets will be generated.protected XContentBuilder doInternalXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
doInternalXContent
in class ValuesSourceAggregationBuilder<DateHistogramBuilder>
IOException
Copyright © 2009–2015. All rights reserved.