public class InternalRange<B extends InternalRange.Bucket,R extends InternalRange<B,R>> extends InternalMultiBucketAggregation<R,B> implements Range
Modifier and Type | Class and Description |
---|---|
static class |
InternalRange.Bucket |
static class |
InternalRange.Factory<B extends InternalRange.Bucket,R extends InternalRange<B,R>> |
InternalMultiBucketAggregation.InternalBucket
InternalAggregation.ReduceContext
Aggregation.CommonFields
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field and Description |
---|---|
protected DocValueFormat |
format |
protected boolean |
keyed |
metaData, name
TYPED_KEYS_DELIMITER
EMPTY_PARAMS
Constructor and Description |
---|
InternalRange(StreamInput in)
Read from a stream.
|
InternalRange(java.lang.String name,
java.util.List<B> ranges,
DocValueFormat format,
boolean keyed,
java.util.List<PipelineAggregator> pipelineAggregators,
java.util.Map<java.lang.String,java.lang.Object> metaData) |
Modifier and Type | Method and Description |
---|---|
R |
create(java.util.List<B> buckets)
Create a new copy of this
Aggregation with the same settings as
this Aggregation and contains the provided buckets. |
B |
createBucket(InternalAggregations aggregations,
B prototype)
Create a new
InternalMultiBucketAggregation.InternalBucket using the provided prototype bucket
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<B> |
getBuckets()
Return the buckets of this range aggregation.
|
InternalRange.Factory<B,R> |
getFactory() |
java.lang.String |
getWriteableName()
Returns the name of the writeable object
|
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
protected DocValueFormat format
protected boolean keyed
public InternalRange(java.lang.String name, java.util.List<B> ranges, DocValueFormat format, boolean keyed, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData)
public InternalRange(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<B> getBuckets()
Range
getBuckets
in interface MultiBucketsAggregation
getBuckets
in interface Range
getBuckets
in class InternalMultiBucketAggregation<R extends InternalRange<B,R>,B extends InternalRange.Bucket>
public InternalRange.Factory<B,R> getFactory()
public R create(java.util.List<B> buckets)
InternalMultiBucketAggregation
Aggregation
with the same settings as
this Aggregation
and contains the provided buckets.create
in class InternalMultiBucketAggregation<R extends InternalRange<B,R>,B extends InternalRange.Bucket>
buckets
- the buckets to use in the new Aggregation
Aggregation
public B createBucket(InternalAggregations aggregations, B prototype)
InternalMultiBucketAggregation
InternalMultiBucketAggregation.InternalBucket
using the provided prototype bucket
and aggregations.createBucket
in class InternalMultiBucketAggregation<R extends InternalRange<B,R>,B extends InternalRange.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