public class HistogramBuilder extends ValuesSourceAggregationBuilder<HistogramBuilder>
Histogram aggregation.ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamstypeEMPTY_PARAMS| Constructor and Description |
|---|
HistogramBuilder(String name)
Constructs a new histogram aggregation builder.
|
| Modifier and Type | Method and Description |
|---|---|
protected XContentBuilder |
doInternalXContent(XContentBuilder builder,
ToXContent.Params params) |
HistogramBuilder |
extendedBounds(Long min,
Long max)
Set extended bounds for the histogram.
|
HistogramBuilder |
interval(long interval)
Sets the interval for the histogram.
|
HistogramBuilder |
minDocCount(long minDocCount)
Sets the minimum document count per bucket.
|
HistogramBuilder |
order(Histogram.Order order)
Sets the order by which the buckets will be returned.
|
HistogramBuilder |
postOffset(long postOffset)
Set the offset to apply after having computed buckets.
|
HistogramBuilder |
preOffset(long preOffset)
Set the offset to apply prior to computing buckets.
|
field, internalXContent, lang, param, params, scriptsubAggregation, subAggregation, subAggregation, subAggregation, subAggregation, subAggregation, toXContentgetNamepublic HistogramBuilder(String name)
name - The name of the aggregation (will serve as the unique identifier for the aggregation result in the response)public HistogramBuilder interval(long interval)
interval - The interval for the histogrampublic HistogramBuilder order(Histogram.Order order)
order - The order by which the buckets will be returnedpublic HistogramBuilder minDocCount(long minDocCount)
minDocCount - The minimum document count per bucketpublic HistogramBuilder extendedBounds(Long min, Long max)
min or the upper value would
be less than max, empty buckets will be generated.public HistogramBuilder preOffset(long preOffset)
public HistogramBuilder postOffset(long postOffset)
protected XContentBuilder doInternalXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
doInternalXContent in class ValuesSourceAggregationBuilder<HistogramBuilder>IOExceptionCopyright © 2009–2016. All rights reserved.