public class InternalHistogram<B extends InternalHistogram.Bucket> extends InternalAggregation implements Histogram
Histogram)?| Modifier and Type | Class and Description |
|---|---|
static class |
InternalHistogram.Bucket |
InternalAggregation.CommonFields, InternalAggregation.ReduceContext, InternalAggregation.TypeHistogram.OrderToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
protected List<B> |
buckets |
nameEMPTY_PARAMS| Modifier and Type | Method and Description |
|---|---|
protected B |
createBucket(long key,
long docCount,
InternalAggregations aggregations,
ValueFormatter formatter) |
XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
B |
getBucketByKey(Number key)
Returns a bucket by the key associated with it.
|
B |
getBucketByKey(String key)
Returns a bucket by the key associated with it.
|
List<B> |
getBuckets() |
protected org.elasticsearch.search.aggregations.bucket.histogram.InternalHistogram.Factory<B> |
getFactory() |
void |
readFrom(StreamInput in) |
InternalAggregation |
reduce(InternalAggregation.ReduceContext reduceContext)
Reduces the given addAggregation to a single one and returns it.
|
static void |
registerStream() |
InternalAggregation.Type |
type() |
void |
writeTo(StreamOutput out) |
getName, readSize, toXContent, writeSizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNameprotected List<B extends InternalHistogram.Bucket> buckets
public static void registerStream()
public InternalAggregation.Type type()
type in class InternalAggregationInternalAggregation.Type of this aggregationpublic List<B> getBuckets()
getBuckets in interface HistogramgetBuckets in interface MultiBucketsAggregationpublic B getBucketByKey(String key)
HistogramgetBucketByKey in interface HistogramgetBucketByKey in interface MultiBucketsAggregationkey - The key of the bucket.public B getBucketByKey(Number key)
HistogramgetBucketByKey in interface Histogramkey - The key of the bucket.protected org.elasticsearch.search.aggregations.bucket.histogram.InternalHistogram.Factory<B> getFactory()
public InternalAggregation reduce(InternalAggregation.ReduceContext reduceContext)
InternalAggregationreduce in class InternalAggregationprotected B createBucket(long key, long docCount, InternalAggregations aggregations, @Nullable ValueFormatter formatter)
public void readFrom(StreamInput in) throws IOException
readFrom in interface StreamableIOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamableIOExceptionpublic XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContentBody in class InternalAggregationIOExceptionCopyright © 2009–2016. All rights reserved.