public abstract class InternalSingleBucketAggregation extends InternalAggregation implements SingleBucketAggregation
InternalAggregation.ReduceContext
Aggregation.CommonFields
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
metaData, name
TYPED_KEYS_DELIMITER
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
InternalSingleBucketAggregation(StreamInput in)
Read from a stream.
|
protected |
InternalSingleBucketAggregation(java.lang.String name,
long docCount,
InternalAggregations aggregations,
java.util.List<PipelineAggregator> pipelineAggregators,
java.util.Map<java.lang.String,java.lang.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 boolean |
doEquals(java.lang.Object obj)
Opportunity for subclasses to add criteria to the
InternalAggregation.equals(Object)
method for this class. |
protected int |
doHashCode()
Opportunity for subclasses to the
InternalAggregation.hashCode() for this
class. |
InternalAggregation |
doReduce(java.util.List<InternalAggregation> aggregations,
InternalAggregation.ReduceContext reduceContext) |
protected void |
doWriteTo(StreamOutput out) |
XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
InternalAggregations |
getAggregations() |
long |
getDocCount() |
java.lang.Object |
getProperty(java.util.List<java.lang.String> path) |
protected abstract InternalSingleBucketAggregation |
newAggregation(java.lang.String name,
long docCount,
InternalAggregations subAggregations)
Create a new empty sub aggregation.
|
equals, getMetaData, getName, getProperty, getType, hashCode, pipelineAggregators, readSize, reduce, toString, toXContent, writeSize, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getMetaData, getName, getType
isFragment
toXContent
getWriteableName
protected InternalSingleBucketAggregation(java.lang.String name, long docCount, InternalAggregations aggregations, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.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.protected InternalSingleBucketAggregation(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 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(java.lang.String name, long docCount, InternalAggregations subAggregations)
public InternalAggregation doReduce(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
doReduce
in class InternalAggregation
public java.lang.Object getProperty(java.util.List<java.lang.String> path)
getProperty
in class InternalAggregation
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContentBody
in class InternalAggregation
java.io.IOException
protected boolean doEquals(java.lang.Object obj)
InternalAggregation
InternalAggregation.equals(Object)
method for this class.
This method can safely cast obj
to the subclass since the
InternalAggregation.equals(Object)
method checks that obj
is the same
class as this
doEquals
in class InternalAggregation
protected int doHashCode()
InternalAggregation
InternalAggregation.hashCode()
for this
class.doHashCode
in class InternalAggregation