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.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Writer<V>
-
-
Field Summary
Fields Modifier and Type Field Description protected InternalAggregationsaggregations-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)AggregationsgetAggregations()longgetDocCount()doublegetSignificanceScore()longgetSubsetDf()longgetSubsetSize()longgetSupersetDf()longgetSupersetSize()inthashCode()protected abstract XContentBuilderkeyToXContent(XContentBuilder builder)Breduce(java.util.List<B> buckets, InternalAggregation.ReduceContext context)XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)-
Methods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
getProperty
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation.Bucket
getKey, getKeyAsString
-
Methods inherited from interface org.elasticsearch.search.aggregations.bucket.significant.SignificantTerms.Bucket
getKeyAsNumber
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
isFragment
-
-
-
-
Field Detail
-
aggregations
protected InternalAggregations aggregations
-
-
Constructor Detail
-
Bucket
protected Bucket(long subsetDf, long subsetSize, long supersetDf, long supersetSize, InternalAggregations aggregations, DocValueFormat format)
-
Bucket
protected Bucket(StreamInput in, long subsetSize, long supersetSize, DocValueFormat format)
Read from a stream.
-
-
Method Detail
-
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
public Aggregations getAggregations()
- Specified by:
getAggregationsin interfaceHasAggregations- Specified by:
getAggregationsin interfaceMultiBucketsAggregation.Bucket- Returns:
- The sub-aggregations of this bucket
-
reduce
public B reduce(java.util.List<B> buckets, InternalAggregation.ReduceContext context)
-
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
-
-