Class SignificantStringTerms.Bucket
java.lang.Object
org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
org.elasticsearch.search.aggregations.bucket.significant.InternalSignificantTerms.Bucket<SignificantStringTerms.Bucket>
org.elasticsearch.search.aggregations.bucket.significant.SignificantStringTerms.Bucket
- All Implemented Interfaces:
Writeable,ToXContent,MultiBucketsAggregation.Bucket,SignificantTerms.Bucket,HasAggregations
- Enclosing class:
- SignificantStringTerms
public static class SignificantStringTerms.Bucket extends InternalSignificantTerms.Bucket<SignificantStringTerms.Bucket>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.bucket.significant.InternalSignificantTerms.Bucket
InternalSignificantTerms.Bucket.Reader<B extends InternalSignificantTerms.Bucket<B>>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 inherited from class org.elasticsearch.search.aggregations.bucket.significant.InternalSignificantTerms.Bucket
aggregations -
Constructor Summary
Constructors Constructor Description Bucket(org.apache.lucene.util.BytesRef term, long subsetDf, long subsetSize, long supersetDf, long supersetSize, InternalAggregations aggregations, DocValueFormat format, double score)Bucket(StreamInput in, long subsetSize, long supersetSize, DocValueFormat format)Read from a stream. -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetKey()java.lang.NumbergetKeyAsNumber()java.lang.StringgetKeyAsString()inthashCode()protected XContentBuilderkeyToXContent(XContentBuilder builder)voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.search.aggregations.bucket.significant.InternalSignificantTerms.Bucket
getAggregations, getDocCount, getSignificanceScore, getSubsetDf, getSubsetSize, getSupersetDf, getSupersetSize, toXContentMethods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
getProperty
-
Constructor Details
-
Bucket
public Bucket(org.apache.lucene.util.BytesRef term, long subsetDf, long subsetSize, long supersetDf, long supersetSize, InternalAggregations aggregations, DocValueFormat format, double score) -
Bucket
public Bucket(StreamInput in, long subsetSize, long supersetSize, DocValueFormat format) throws java.io.IOExceptionRead from a stream.- Throws:
java.io.IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Throws:
java.io.IOException
-
getKeyAsNumber
public java.lang.Number getKeyAsNumber()- Returns:
- The key, expressed as a number
-
getKeyAsString
public java.lang.String getKeyAsString()- Returns:
- The key associated with the bucket as a string
-
getKey
public java.lang.String getKey()- Returns:
- The key associated with the bucket
-
keyToXContent
- Specified by:
keyToXContentin classInternalSignificantTerms.Bucket<SignificantStringTerms.Bucket>- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classInternalSignificantTerms.Bucket<SignificantStringTerms.Bucket>
-
hashCode
public int hashCode()- Overrides:
hashCodein classInternalSignificantTerms.Bucket<SignificantStringTerms.Bucket>
-