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 interface
InternalSignificantTerms.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 InternalAggregations
aggregations
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Bucket(long subsetDf, long subsetSize, long supersetDf, long supersetSize, InternalAggregations aggregations, DocValueFormat format)
protected
Bucket(StreamInput in, long subsetSize, long supersetSize, DocValueFormat format)
Read from a stream.
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object o)
Aggregations
getAggregations()
long
getDocCount()
double
getSignificanceScore()
long
getSubsetDf()
long
getSubsetSize()
long
getSupersetDf()
long
getSupersetSize()
int
hashCode()
protected abstract XContentBuilder
keyToXContent(XContentBuilder builder)
B
reduce(java.util.List<B> buckets, InternalAggregation.ReduceContext context)
XContentBuilder
toXContent(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:
getSubsetDf
in 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:
getSupersetDf
in 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:
getSupersetSize
in interfaceSignificantTerms.Bucket
- Returns:
- The numbers of docs in the superset (ordinarily the background count of the containing aggregation).
-
getSubsetSize
public long getSubsetSize()
- Specified by:
getSubsetSize
in 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:
getDocCount
in interfaceMultiBucketsAggregation.Bucket
- Returns:
- The number of documents that fall within this bucket
-
getAggregations
public Aggregations getAggregations()
- Specified by:
getAggregations
in interfaceHasAggregations
- Specified by:
getAggregations
in 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:
getSignificanceScore
in interfaceSignificantTerms.Bucket
- Returns:
- The significant score for the subset
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toXContent
public final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
keyToXContent
protected abstract XContentBuilder keyToXContent(XContentBuilder builder) throws java.io.IOException
- Throws:
java.io.IOException
-
-