Class ParsedMultiBucketAggregation.ParsedBucket
- java.lang.Object
-
- org.elasticsearch.search.aggregations.ParsedMultiBucketAggregation.ParsedBucket
-
- All Implemented Interfaces:
ToXContent,MultiBucketsAggregation.Bucket,HasAggregations
- Direct Known Subclasses:
ParsedAdjacencyMatrix.ParsedBucket,ParsedAutoDateHistogram.ParsedBucket,ParsedBinaryRange.ParsedBucket,ParsedComposite.ParsedBucket,ParsedDateHistogram.ParsedBucket,ParsedFilters.ParsedBucket,ParsedGeoHashGrid.ParsedBucket,ParsedRange.ParsedBucket,ParsedSignificantTerms.ParsedBucket,ParsedTerms.ParsedBucket
- Enclosing class:
- ParsedMultiBucketAggregation<B extends MultiBucketsAggregation.Bucket>
public abstract static class ParsedMultiBucketAggregation.ParsedBucket extends java.lang.Object implements MultiBucketsAggregation.Bucket
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description ParsedBucket()
-
Method Summary
Modifier and Type Method Description AggregationsgetAggregations()longgetDocCount()java.lang.StringgetKeyAsString()protected booleanisKeyed()protected XContentBuilderkeyToXContent(XContentBuilder builder)protected static <B extends ParsedMultiBucketAggregation.ParsedBucket>
BparseXContent(XContentParser parser, boolean keyed, java.util.function.Supplier<B> bucketSupplier, CheckedBiConsumer<XContentParser,B,java.io.IOException> keyConsumer)protected voidsetAggregations(Aggregations aggregations)protected voidsetDocCount(long docCount)protected voidsetKeyAsString(java.lang.String keyAsString)voidsetKeyed(boolean keyed)XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)-
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.bucket.MultiBucketsAggregation.Bucket
getKey
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
isFragment
-
-
-
-
Method Detail
-
setKeyAsString
protected void setKeyAsString(java.lang.String keyAsString)
-
getKeyAsString
public java.lang.String getKeyAsString()
- Specified by:
getKeyAsStringin interfaceMultiBucketsAggregation.Bucket- Returns:
- The key associated with the bucket as a string
-
setDocCount
protected void setDocCount(long docCount)
-
getDocCount
public long getDocCount()
- Specified by:
getDocCountin interfaceMultiBucketsAggregation.Bucket- Returns:
- The number of documents that fall within this bucket
-
setKeyed
public void setKeyed(boolean keyed)
-
isKeyed
protected boolean isKeyed()
-
setAggregations
protected void setAggregations(Aggregations aggregations)
-
getAggregations
public Aggregations getAggregations()
- Specified by:
getAggregationsin interfaceHasAggregations- Specified by:
getAggregationsin interfaceMultiBucketsAggregation.Bucket- Returns:
- The sub-aggregations of this bucket
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
keyToXContent
protected XContentBuilder keyToXContent(XContentBuilder builder) throws java.io.IOException
- Throws:
java.io.IOException
-
parseXContent
protected static <B extends ParsedMultiBucketAggregation.ParsedBucket> B parseXContent(XContentParser parser, boolean keyed, java.util.function.Supplier<B> bucketSupplier, CheckedBiConsumer<XContentParser,B,java.io.IOException> keyConsumer) throws java.io.IOException
- Throws:
java.io.IOException
-
-