public abstract class InternalSingleBucketAggregation extends InternalAggregation implements SingleBucketAggregation
InternalAggregation.CommonFields, InternalAggregation.ReduceContext, InternalAggregation.TypeToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsmetaData, nameEMPTY_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, writeToclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMetaData, getName, getPropertyprotected 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 SingleBucketAggregationpublic InternalAggregations getAggregations()
getAggregations in interface SingleBucketAggregationgetAggregations in interface HasAggregationspublic 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 AggregationAggregationprotected abstract InternalSingleBucketAggregation newAggregation(String name, long docCount, InternalAggregations subAggregations)
public InternalAggregation doReduce(List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
doReduce in class InternalAggregationpublic Object getProperty(List<String> path)
getProperty in class InternalAggregationprotected void doReadFrom(StreamInput in) throws IOException
doReadFrom in class InternalAggregationIOExceptionprotected void doWriteTo(StreamOutput out) throws IOException
doWriteTo in class InternalAggregationIOExceptionpublic XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContentBody in class InternalAggregationIOExceptionCopyright © 2009–2017. All rights reserved.