public abstract class InternalSingleBucketAggregation extends InternalAggregation implements SingleBucketAggregation
InternalAggregation.CommonFields, InternalAggregation.ReduceContext, InternalAggregation.Type
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
metaData, name
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
InternalSingleBucketAggregation() |
protected |
InternalSingleBucketAggregation(String name,
long docCount,
InternalAggregations aggregations,
List<PipelineAggregator> pipelineAggregators,
Map<String,Object> metaData)
Creates a single bucket aggregation.
|
Modifier and Type | Method and Description |
---|---|
InternalSingleBucketAggregation |
create(InternalAggregations subAggregations)
Create a new copy of this
Aggregation with the same settings as
this Aggregation and contains the provided sub-aggregations. |
protected void |
doReadFrom(StreamInput in) |
InternalAggregation |
doReduce(List<InternalAggregation> aggregations,
InternalAggregation.ReduceContext reduceContext) |
protected void |
doWriteTo(StreamOutput out) |
XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
InternalAggregations |
getAggregations() |
long |
getDocCount() |
Object |
getProperty(List<String> path) |
protected abstract InternalSingleBucketAggregation |
newAggregation(String name,
long docCount,
InternalAggregations subAggregations)
Create a new empty sub aggregation.
|
getMetaData, getName, getProperty, pipelineAggregators, readFrom, readSize, reduce, toXContent, type, writeSize, writeTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetaData, getName, getProperty
protected InternalSingleBucketAggregation()
protected InternalSingleBucketAggregation(String name, long docCount, InternalAggregations aggregations, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData)
name
- The aggregation name.docCount
- The document count in the single bucket.aggregations
- The already built sub-aggregations that are associated with the bucket.public long getDocCount()
getDocCount
in interface SingleBucketAggregation
public InternalAggregations getAggregations()
getAggregations
in interface SingleBucketAggregation
getAggregations
in interface HasAggregations
public InternalSingleBucketAggregation create(InternalAggregations subAggregations)
Aggregation
with the same settings as
this Aggregation
and contains the provided sub-aggregations.subAggregations
- the buckets to use in the new Aggregation
Aggregation
protected abstract InternalSingleBucketAggregation newAggregation(String name, long docCount, InternalAggregations subAggregations)
public InternalAggregation doReduce(List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
doReduce
in class InternalAggregation
public Object getProperty(List<String> path)
getProperty
in class InternalAggregation
protected void doReadFrom(StreamInput in) throws IOException
doReadFrom
in class InternalAggregation
IOException
protected void doWriteTo(StreamOutput out) throws IOException
doWriteTo
in class InternalAggregation
IOException
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContentBody
in class InternalAggregation
IOException
Copyright © 2009–2017. All rights reserved.