Module org.elasticsearch.server
Class StringTerms.Bucket
java.lang.Object
org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
org.elasticsearch.search.aggregations.bucket.terms.AbstractInternalTerms.AbstractTermsBucket<StringTerms.Bucket>
org.elasticsearch.search.aggregations.bucket.terms.InternalTerms.Bucket<StringTerms.Bucket>
org.elasticsearch.search.aggregations.bucket.terms.StringTerms.Bucket
- All Implemented Interfaces:
MultiBucketsAggregation.Bucket,Terms.Bucket,KeyComparable<StringTerms.Bucket>
- Enclosing class:
StringTerms
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.bucket.terms.InternalTerms.Bucket
InternalTerms.Bucket.Reader<B extends InternalTerms.Bucket<B>> -
Field Summary
Fields inherited from class org.elasticsearch.search.aggregations.bucket.terms.InternalTerms.Bucket
aggregations, docCount, format -
Constructor Summary
ConstructorsConstructorDescriptionBucket(org.apache.lucene.util.BytesRef term, long docCount, InternalAggregations aggregations, boolean showDocCountError, long docCountError, DocValueFormat format) Bucket(StreamInput in, DocValueFormat format, boolean showDocCountError) Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionintcompareKey(StringTerms.Bucket other) Compare thisMultiBucketsAggregation.Bucketskeywith another bucket.booleangetKey()org.apache.lucene.util.BytesRefinthashCode()protected final XContentBuilderkeyToXContent(XContentBuilder builder) voidsetTermBytes(org.apache.lucene.util.BytesRef termBytes) protected voidwriteTermTo(StreamOutput out) Methods inherited from class org.elasticsearch.search.aggregations.bucket.terms.InternalTerms.Bucket
bucketToXContent, getAggregations, getDocCount, getDocCountError, setAggregations, setDocCount, setDocCountError, updateDocCountErrorMethods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
getProperty
-
Constructor Details
-
Bucket
public Bucket(org.apache.lucene.util.BytesRef term, long docCount, InternalAggregations aggregations, boolean showDocCountError, long docCountError, DocValueFormat format) -
Bucket
Read from a stream.- Throws:
IOException
-
-
Method Details
-
writeTermTo
- Specified by:
writeTermToin classInternalTerms.Bucket<StringTerms.Bucket>- Throws:
IOException
-
getKey
- Returns:
- The key associated with the bucket
-
getTermBytes
public org.apache.lucene.util.BytesRef getTermBytes() -
setTermBytes
public void setTermBytes(org.apache.lucene.util.BytesRef termBytes) -
getKeyAsNumber
-
getKeyAsString
- Returns:
- The key associated with the bucket as a string
-
compareKey
Description copied from interface:KeyComparableCompare thisMultiBucketsAggregation.Bucketskeywith another bucket.- Parameters:
other- the bucket that contains the key to compare to.- Returns:
- a negative integer, zero, or a positive integer as this buckets key is less than, equal to, or greater than the other buckets key.
- See Also:
-
keyToXContent
- Specified by:
keyToXContentin classInternalTerms.Bucket<StringTerms.Bucket>- Throws:
IOException
-
equals
- Overrides:
equalsin classInternalTerms.Bucket<StringTerms.Bucket>
-
hashCode
public int hashCode()- Overrides:
hashCodein classInternalTerms.Bucket<StringTerms.Bucket>
-