public abstract class InternalSingleBucketAggregation extends InternalAggregation implements SingleBucketAggregation
InternalAggregation.CommonFields, InternalAggregation.ReduceContext, InternalAggregation.TypeToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsnameEMPTY_PARAMS| Modifier | Constructor and Description |
|---|---|
protected |
InternalSingleBucketAggregation() |
protected |
InternalSingleBucketAggregation(String name,
long docCount,
InternalAggregations aggregations)
Creates a single bucket aggregation.
|
| Modifier and Type | Method and Description |
|---|---|
XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
InternalAggregations |
getAggregations() |
long |
getDocCount() |
protected abstract InternalSingleBucketAggregation |
newAggregation(String name,
long docCount,
InternalAggregations subAggregations)
Create a new empty sub aggregation.
|
void |
readFrom(StreamInput in) |
InternalAggregation |
reduce(InternalAggregation.ReduceContext reduceContext)
Reduces the given addAggregation to a single one and returns it.
|
void |
writeTo(StreamOutput out) |
getName, readSize, toXContent, type, writeSizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNameprotected InternalSingleBucketAggregation()
protected InternalSingleBucketAggregation(String name, long docCount, InternalAggregations aggregations)
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 HasAggregationsprotected abstract InternalSingleBucketAggregation newAggregation(String name, long docCount, InternalAggregations subAggregations)
public InternalAggregation reduce(InternalAggregation.ReduceContext reduceContext)
InternalAggregationreduce in class InternalAggregationpublic void readFrom(StreamInput in) throws IOException
readFrom in interface StreamableIOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamableIOExceptionpublic XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContentBody in class InternalAggregationIOExceptionCopyright © 2009–2016. All rights reserved.