Class ParsedSingleBucketAggregation
java.lang.Object
org.elasticsearch.search.aggregations.ParsedAggregation
org.elasticsearch.search.aggregations.bucket.ParsedSingleBucketAggregation
- All Implemented Interfaces:
ToXContent,ToXContentFragment,Aggregation,SingleBucketAggregation,HasAggregations
- Direct Known Subclasses:
ParsedFilter,ParsedGlobal,ParsedMissing,ParsedNested,ParsedReverseNested,ParsedSampler
public abstract class ParsedSingleBucketAggregation extends ParsedAggregation implements SingleBucketAggregation
A base class for all the single bucket aggregations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
Aggregation.CommonFieldsNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params -
Field Summary
Fields Modifier and Type Field Description protected AggregationsaggregationsFields inherited from interface org.elasticsearch.search.aggregations.Aggregation
TYPED_KEYS_DELIMITER -
Constructor Summary
Constructors Constructor Description ParsedSingleBucketAggregation() -
Method Summary
Modifier and Type Method Description XContentBuilderdoXContentBody(XContentBuilder builder, ToXContent.Params params)AggregationsgetAggregations()longgetDocCount()protected static <T extends ParsedSingleBucketAggregation>
TparseXContent(XContentParser parser, T aggregation, java.lang.String name)protected voidsetDocCount(long docCount)Methods inherited from class org.elasticsearch.search.aggregations.ParsedAggregation
declareAggregationFields, getMetaData, getName, parseDouble, setName, toXContentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.Aggregation
getMetaData, getName, getType
-
Field Details
-
Constructor Details
-
ParsedSingleBucketAggregation
public ParsedSingleBucketAggregation()
-
-
Method Details
-
getDocCount
public long getDocCount()- Specified by:
getDocCountin interfaceSingleBucketAggregation- Returns:
- The number of documents in this bucket
-
setDocCount
protected void setDocCount(long docCount) -
getAggregations
- Specified by:
getAggregationsin interfaceHasAggregations- Specified by:
getAggregationsin interfaceSingleBucketAggregation- Returns:
- The sub-aggregations of this bucket
-
doXContentBody
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
doXContentBodyin classParsedAggregation- Throws:
java.io.IOException
-
parseXContent
protected static <T extends ParsedSingleBucketAggregation> T parseXContent(XContentParser parser, T aggregation, java.lang.String name) throws java.io.IOException- Throws:
java.io.IOException
-