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.Type
Histogram.Order
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
protected List<B> |
buckets |
name
EMPTY_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, writeSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
protected List<B extends InternalHistogram.Bucket> buckets
public static void registerStream()
public InternalAggregation.Type type()
type
in class InternalAggregation
InternalAggregation.Type
of this aggregationpublic List<B> getBuckets()
getBuckets
in interface Histogram
getBuckets
in interface MultiBucketsAggregation
public B getBucketByKey(String key)
Histogram
getBucketByKey
in interface Histogram
getBucketByKey
in interface MultiBucketsAggregation
key
- The key of the bucket.public B getBucketByKey(Number key)
Histogram
getBucketByKey
in interface Histogram
key
- The key of the bucket.protected org.elasticsearch.search.aggregations.bucket.histogram.InternalHistogram.Factory<B> getFactory()
public InternalAggregation reduce(InternalAggregation.ReduceContext reduceContext)
InternalAggregation
reduce
in class InternalAggregation
protected B createBucket(long key, long docCount, InternalAggregations aggregations, @Nullable ValueFormatter formatter)
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
IOException
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContentBody
in class InternalAggregation
IOException
Copyright © 2009–2015. All rights reserved.