Class InternalSignificantTerms.Bucket<B extends InternalSignificantTerms.Bucket<B>>
java.lang.Object
org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
org.elasticsearch.search.aggregations.bucket.significant.InternalSignificantTerms.Bucket<B>
- All Implemented Interfaces:
Writeable,ToXContent,MultiBucketsAggregation.Bucket,SignificantTerms.Bucket,HasAggregations
- Direct Known Subclasses:
SignificantStringTerms.Bucket,UnmappedSignificantTerms.Bucket
- Enclosing class:
- InternalSignificantTerms<A extends InternalSignificantTerms<A,B>,B extends InternalSignificantTerms.Bucket<B>>
public abstract static class InternalSignificantTerms.Bucket<B extends InternalSignificantTerms.Bucket<B>> extends InternalMultiBucketAggregation.InternalBucket implements SignificantTerms.Bucket
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceInternalSignificantTerms.Bucket.Reader<B extends InternalSignificantTerms.Bucket<B>>Reads a bucket.Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Writer<V> -
Field Summary
Fields Modifier and Type Field Description protected InternalAggregationsaggregations -
Constructor Summary
Constructors Modifier Constructor Description protectedBucket(long subsetDf, long subsetSize, long supersetDf, long supersetSize, InternalAggregations aggregations, DocValueFormat format)protectedBucket(StreamInput in, long subsetSize, long supersetSize, DocValueFormat format)Read from a stream. -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)AggregationsgetAggregations()longgetDocCount()doublegetSignificanceScore()longgetSubsetDf()longgetSubsetSize()longgetSupersetDf()longgetSupersetSize()inthashCode()protected abstract XContentBuilderkeyToXContent(XContentBuilder builder)XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)Methods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
getPropertyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation.Bucket
getKey, getKeyAsStringMethods inherited from interface org.elasticsearch.search.aggregations.bucket.significant.SignificantTerms.Bucket
getKeyAsNumber
-
Field Details
-
Constructor Details
-
Bucket
protected Bucket(long subsetDf, long subsetSize, long supersetDf, long supersetSize, InternalAggregations aggregations, DocValueFormat format) -
Bucket
Read from a stream.
-
-
Method Details
-
getSubsetDf
public long getSubsetDf()- Specified by:
getSubsetDfin interfaceSignificantTerms.Bucket- Returns:
- The number of docs in the subset containing a particular term. This number is equal to the document count of the bucket.
-
getSupersetDf
public long getSupersetDf()- Specified by:
getSupersetDfin interfaceSignificantTerms.Bucket- Returns:
- The number of docs in the superset containing a particular term (also known as the "background count" of the bucket)
-
getSupersetSize
public long getSupersetSize()- Specified by:
getSupersetSizein interfaceSignificantTerms.Bucket- Returns:
- The numbers of docs in the superset (ordinarily the background count of the containing aggregation).
-
getSubsetSize
public long getSubsetSize()- Specified by:
getSubsetSizein interfaceSignificantTerms.Bucket- Returns:
- The numbers of docs in the subset (also known as "foreground set"). This number is equal to the document count of the containing aggregation.
-
getDocCount
public long getDocCount()- Specified by:
getDocCountin interfaceMultiBucketsAggregation.Bucket- Returns:
- The number of documents that fall within this bucket
-
getAggregations
- Specified by:
getAggregationsin interfaceHasAggregations- Specified by:
getAggregationsin interfaceMultiBucketsAggregation.Bucket- Returns:
- The sub-aggregations of this bucket
-
getSignificanceScore
public double getSignificanceScore()- Specified by:
getSignificanceScorein interfaceSignificantTerms.Bucket- Returns:
- The significant score for the subset
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toXContent
public final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
keyToXContent
protected abstract XContentBuilder keyToXContent(XContentBuilder builder) throws java.io.IOException- Throws:
java.io.IOException
-