public final class InternalHistogram extends InternalMultiBucketAggregation<InternalHistogram,InternalHistogram.Bucket> implements Histogram, HistogramFactory
Histogram.| Modifier and Type | Class and Description |
|---|---|
static class |
InternalHistogram.Bucket |
InternalMultiBucketAggregation.InternalBucketInternalAggregation.ReduceContextAggregation.CommonFieldsToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>metaData, nameEXTENDED_BOUNDS_FIELD, INTERVAL_FIELD, KEYED_FIELD, MIN_DOC_COUNT_FIELD, OFFSET_FIELD, ORDER_FIELDTYPED_KEYS_DELIMITEREMPTY_PARAMS| Constructor and Description |
|---|
InternalHistogram(StreamInput in)
Stream from a stream.
|
| Modifier and Type | Method and Description |
|---|---|
InternalHistogram |
create(java.util.List<InternalHistogram.Bucket> buckets)
Create a new copy of this
Aggregation with the same settings as
this Aggregation and contains the provided buckets. |
InternalAggregation |
createAggregation(java.util.List<MultiBucketsAggregation.Bucket> buckets)
Create an
InternalAggregation object that wraps the given buckets. |
InternalHistogram.Bucket |
createBucket(InternalAggregations aggregations,
InternalHistogram.Bucket prototype)
Create a new
InternalMultiBucketAggregation.InternalBucket using the provided prototype bucket
and aggregations. |
InternalHistogram.Bucket |
createBucket(java.lang.Number key,
long docCount,
InternalAggregations aggregations)
Create a
MultiBucketsAggregation.Bucket object that wraps the
given key, document count and aggregations. |
protected boolean |
doEquals(java.lang.Object obj)
Opportunity for subclasses to add criteria to the
InternalAggregation.equals(Object)
method for this class. |
protected int |
doHashCode()
Opportunity for subclasses to the
InternalAggregation.hashCode() for this
class. |
InternalAggregation |
doReduce(java.util.List<InternalAggregation> aggregations,
InternalAggregation.ReduceContext reduceContext) |
protected void |
doWriteTo(StreamOutput out) |
XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
java.util.List<InternalHistogram.Bucket> |
getBuckets() |
java.lang.Number |
getKey(MultiBucketsAggregation.Bucket bucket)
Get the key for the given bucket.
|
java.lang.String |
getWriteableName()
Returns the name of the writeable object
|
java.lang.Number |
nextKey(java.lang.Number key)
Given a key returned by
HistogramFactory.getKey(org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation.Bucket), compute the lowest key that is
greater than it. |
getPropertyequals, getMetaData, getName, getProperty, getType, hashCode, pipelineAggregators, readSize, reduce, toString, toXContent, writeSize, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetMetaData, getName, getTypeisFragmenttoXContentpublic InternalHistogram(StreamInput in) throws java.io.IOException
java.io.IOExceptionprotected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo in class InternalAggregationjava.io.IOExceptionpublic java.lang.String getWriteableName()
NamedWriteablegetWriteableName in interface NamedWriteablepublic java.util.List<InternalHistogram.Bucket> getBuckets()
getBuckets in interface HistogramgetBuckets in interface MultiBucketsAggregationgetBuckets in class InternalMultiBucketAggregation<InternalHistogram,InternalHistogram.Bucket>public InternalHistogram create(java.util.List<InternalHistogram.Bucket> buckets)
InternalMultiBucketAggregationAggregation with the same settings as
this Aggregation and contains the provided buckets.create in class InternalMultiBucketAggregation<InternalHistogram,InternalHistogram.Bucket>buckets - the buckets to use in the new AggregationAggregationpublic InternalHistogram.Bucket createBucket(InternalAggregations aggregations, InternalHistogram.Bucket prototype)
InternalMultiBucketAggregationInternalMultiBucketAggregation.InternalBucket using the provided prototype bucket
and aggregations.createBucket in class InternalMultiBucketAggregation<InternalHistogram,InternalHistogram.Bucket>aggregations - the aggregations for the new bucketprototype - the bucket to use as a prototypepublic InternalAggregation doReduce(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
doReduce in class InternalAggregationpublic XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContentBody in class InternalAggregationjava.io.IOExceptionpublic java.lang.Number getKey(MultiBucketsAggregation.Bucket bucket)
HistogramFactorygetKey in interface HistogramFactorypublic java.lang.Number nextKey(java.lang.Number key)
HistogramFactoryHistogramFactory.getKey(org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation.Bucket), compute the lowest key that is
greater than it.nextKey in interface HistogramFactorypublic InternalAggregation createAggregation(java.util.List<MultiBucketsAggregation.Bucket> buckets)
HistogramFactoryInternalAggregation object that wraps the given buckets.createAggregation in interface HistogramFactorypublic InternalHistogram.Bucket createBucket(java.lang.Number key, long docCount, InternalAggregations aggregations)
HistogramFactoryMultiBucketsAggregation.Bucket object that wraps the
given key, document count and aggregations.createBucket in interface HistogramFactoryprotected boolean doEquals(java.lang.Object obj)
InternalAggregationInternalAggregation.equals(Object)
method for this class.
This method can safely cast obj to the subclass since the
InternalAggregation.equals(Object) method checks that obj is the same
class as thisdoEquals in class InternalAggregationprotected int doHashCode()
InternalAggregationInternalAggregation.hashCode() for this
class.doHashCode in class InternalAggregation