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 |
format(String format)
Set the format to use for dates.
|
DateHistogramBuilder |
interval(DateHistogramInterval 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) |
DateHistogramBuilder |
order(Histogram.Order order)
Set the order by which the buckets will be returned.
|
DateHistogramBuilder |
timeZone(String timeZone)
Set the timezone in which to translate dates before computing buckets.
|
field, internalXContent, missing, script
setMetaData, subAggregation, subAggregation, subAggregation, subAggregation, subAggregation, subAggregation, toXContent
getName
public DateHistogramBuilder(String name)
public DateHistogramBuilder interval(long interval)
public DateHistogramBuilder interval(DateHistogramInterval interval)
public DateHistogramBuilder order(Histogram.Order order)
public DateHistogramBuilder minDocCount(long minDocCount)
public DateHistogramBuilder timeZone(String timeZone)
public DateHistogramBuilder offset(String offset)
offset
- sets the offset of time intervals in this histogrampublic 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–2016. All rights reserved.