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.CommonFields
-
Nested 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 Aggregationsaggregations-
Fields inherited from class org.elasticsearch.search.aggregations.ParsedAggregation
metadata
-
Fields inherited from interface org.elasticsearch.search.aggregations.Aggregation
TYPED_KEYS_DELIMITER
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
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, toXContent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.search.aggregations.Aggregation
getMetaData, getName, getType
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContent
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Field Detail
-
aggregations
protected Aggregations aggregations
-
-
Method Detail
-
getDocCount
public long getDocCount()
- Specified by:
getDocCountin interfaceSingleBucketAggregation- Returns:
- The number of documents in this bucket
-
setDocCount
protected void setDocCount(long docCount)
-
getAggregations
public Aggregations 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
-
-