Class ParsedMultiBucketAggregation.ParsedBucket
java.lang.Object
org.elasticsearch.search.aggregations.ParsedMultiBucketAggregation.ParsedBucket
- All Implemented Interfaces:
MultiBucketsAggregation.Bucket,HasAggregations,ToXContent
- Direct Known Subclasses:
ParsedAdjacencyMatrix.ParsedBucket,ParsedAutoDateHistogram.ParsedBucket,ParsedBinaryRange.ParsedBucket,ParsedComposite.ParsedBucket,ParsedDateHistogram.ParsedBucket,ParsedFilters.ParsedBucket,ParsedGeoGridBucket,ParsedRange.ParsedBucket,ParsedRareTerms.ParsedBucket,ParsedSignificantTerms.ParsedBucket,ParsedTerms.ParsedBucket,ParsedVariableWidthHistogram.ParsedBucket
- Enclosing class:
- ParsedMultiBucketAggregation<B extends MultiBucketsAggregation.Bucket>
public abstract static class ParsedMultiBucketAggregation.ParsedBucket
extends Object
implements MultiBucketsAggregation.Bucket
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params -
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongprotected booleanisKeyed()protected XContentBuilderkeyToXContent(XContentBuilder builder) protected static <B extends ParsedMultiBucketAggregation.ParsedBucket>
BparseXContent(XContentParser parser, boolean keyed, Supplier<B> bucketSupplier, CheckedBiConsumer<XContentParser, B, IOException> keyConsumer) protected voidsetAggregations(Aggregations aggregations) protected voidsetDocCount(long docCount) protected voidsetKeyAsString(String keyAsString) voidsetKeyed(boolean keyed) toXContent(XContentBuilder builder, ToXContent.Params params) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation.Bucket
getKeyMethods inherited from interface org.elasticsearch.xcontent.ToXContent
isFragment
-
Constructor Details
-
ParsedBucket
public ParsedBucket()
-
-
Method Details
-
setKeyAsString
-
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
-
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 IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
keyToXContent
- Throws:
IOException
-
parseXContent
protected static <B extends ParsedMultiBucketAggregation.ParsedBucket> B parseXContent(XContentParser parser, boolean keyed, Supplier<B> bucketSupplier, CheckedBiConsumer<XContentParser, B, throws IOExceptionIOException> keyConsumer) - Throws:
IOException
-