public abstract class InternalSingleBucketAggregation extends InternalAggregation implements SingleBucketAggregation
InternalAggregation.CommonFields, InternalAggregation.ReduceContext, InternalAggregation.Type
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
name
EMPTY_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, writeSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
protected 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 SingleBucketAggregation
public InternalAggregations getAggregations()
getAggregations
in interface SingleBucketAggregation
getAggregations
in interface HasAggregations
protected abstract InternalSingleBucketAggregation newAggregation(String name, long docCount, InternalAggregations subAggregations)
public InternalAggregation reduce(InternalAggregation.ReduceContext reduceContext)
InternalAggregation
reduce
in class InternalAggregation
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
IOException
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContentBody
in class InternalAggregation
IOException
Copyright © 2009–2015. All rights reserved.