public class HistogramBuilder extends ValuesSourceAggregationBuilder<HistogramBuilder>
Histogram
aggregation.ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
type
EMPTY_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 |
offset(long offset)
Set the offset to apply to shift bucket boundaries.
|
HistogramBuilder |
order(Histogram.Order order)
Sets the order by which the buckets will be returned.
|
field, internalXContent, missing, script
setMetaData, subAggregation, subAggregation, subAggregation, subAggregation, subAggregation, subAggregation, toXContent
getName
public 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 offset(long offset)
protected XContentBuilder doInternalXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
doInternalXContent
in class ValuesSourceAggregationBuilder<HistogramBuilder>
IOException
Copyright © 2009–2016. All rights reserved.