public final class InternalDateHistogram extends InternalMultiBucketAggregation<InternalDateHistogram,InternalDateHistogram.Bucket> implements Histogram, HistogramFactory
Histogram
.Modifier and Type | Class and Description |
---|---|
static class |
InternalDateHistogram.Bucket |
InternalMultiBucketAggregation.InternalBucket
InternalAggregation.ReduceContext
Histogram.Order
Aggregation.CommonFields
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
metaData, name
EXTENDED_BOUNDS_FIELD, INTERVAL_FIELD, KEYED_FIELD, MIN_DOC_COUNT_FIELD, OFFSET_FIELD, ORDER_FIELD
TYPED_KEYS_DELIMITER
EMPTY_PARAMS
Constructor and Description |
---|
InternalDateHistogram(StreamInput in)
Stream from a stream.
|
Modifier and Type | Method and Description |
---|---|
InternalDateHistogram |
create(java.util.List<InternalDateHistogram.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. |
InternalDateHistogram.Bucket |
createBucket(InternalAggregations aggregations,
InternalDateHistogram.Bucket prototype)
Create a new
InternalMultiBucketAggregation.InternalBucket using the provided prototype bucket
and aggregations. |
InternalDateHistogram.Bucket |
createBucket(java.lang.Number key,
long docCount,
InternalAggregations aggregations)
Create a
MultiBucketsAggregation.Bucket object that wraps the
given key, document count and aggregations. |
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<InternalDateHistogram.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. |
getProperty
getMetaData, getName, getProperty, getType, pipelineAggregators, readSize, reduce, toXContent, writeSize, writeTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetaData, getName, getType
isFragment, toXContent
public InternalDateHistogram(StreamInput in) throws java.io.IOException
java.io.IOException
protected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class InternalAggregation
java.io.IOException
public java.lang.String getWriteableName()
NamedWriteable
getWriteableName
in interface NamedWriteable
public java.util.List<InternalDateHistogram.Bucket> getBuckets()
getBuckets
in interface Histogram
getBuckets
in interface MultiBucketsAggregation
getBuckets
in class InternalMultiBucketAggregation<InternalDateHistogram,InternalDateHistogram.Bucket>
public InternalDateHistogram create(java.util.List<InternalDateHistogram.Bucket> buckets)
InternalMultiBucketAggregation
Aggregation
with the same settings as
this Aggregation
and contains the provided buckets.create
in class InternalMultiBucketAggregation<InternalDateHistogram,InternalDateHistogram.Bucket>
buckets
- the buckets to use in the new Aggregation
Aggregation
public InternalDateHistogram.Bucket createBucket(InternalAggregations aggregations, InternalDateHistogram.Bucket prototype)
InternalMultiBucketAggregation
InternalMultiBucketAggregation.InternalBucket
using the provided prototype bucket
and aggregations.createBucket
in class InternalMultiBucketAggregation<InternalDateHistogram,InternalDateHistogram.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 InternalAggregation
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContentBody
in class InternalAggregation
java.io.IOException
public java.lang.Number getKey(MultiBucketsAggregation.Bucket bucket)
HistogramFactory
getKey
in interface HistogramFactory
public java.lang.Number nextKey(java.lang.Number key)
HistogramFactory
HistogramFactory.getKey(org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation.Bucket)
, compute the lowest key that is
greater than it.nextKey
in interface HistogramFactory
public InternalAggregation createAggregation(java.util.List<MultiBucketsAggregation.Bucket> buckets)
HistogramFactory
InternalAggregation
object that wraps the given buckets.createAggregation
in interface HistogramFactory
public InternalDateHistogram.Bucket createBucket(java.lang.Number key, long docCount, InternalAggregations aggregations)
HistogramFactory
MultiBucketsAggregation.Bucket
object that wraps the
given key, document count and aggregations.createBucket
in interface HistogramFactory