Class LongTerms.Bucket
org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
org.elasticsearch.search.aggregations.bucket.terms.AbstractInternalTerms.AbstractTermsBucket
org.elasticsearch.search.aggregations.bucket.terms.InternalTerms.Bucket<LongTerms.Bucket>
org.elasticsearch.search.aggregations.bucket.terms.LongTerms.Bucket
- All Implemented Interfaces:
Writeable
,org.elasticsearch.common.xcontent.ToXContent
,MultiBucketsAggregation.Bucket
,Terms.Bucket
,HasAggregations
,KeyComparable<LongTerms.Bucket>
- Enclosing class:
- LongTerms
-
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>>
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Nested 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.terms.InternalTerms.Bucket
aggregations, docCount, docCountError, format, showDocCountError
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionBucket(long 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 TypeMethodDescriptionint
compareKey(LongTerms.Bucket other)
Compare thisMultiBucketsAggregation.Bucket
skey
with another bucket.boolean
obj)
getKey()
int
hashCode()
protected org.elasticsearch.common.xcontent.XContentBuilder
keyToXContent(org.elasticsearch.common.xcontent.XContentBuilder builder)
protected void
writeTermTo(StreamOutput out)
Methods inherited from class org.elasticsearch.search.aggregations.bucket.terms.InternalTerms.Bucket
getAggregations, getDocCount, getDocCountError, getShowDocCountError, setDocCountError, toXContent, updateDocCountError, writeTo
Methods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
getProperty
Methods inherited from class java.lang.
, , , , , , , ,
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
isFragment
-
Constructor Details
-
Bucket
public Bucket(long term, long docCount, InternalAggregations aggregations, boolean showDocCountError, long docCountError, DocValueFormat format) -
Bucket
Read from a stream.- Throws:
-
-
Method Details
-
writeTermTo
- Specified by:
writeTermTo
in classInternalTerms.Bucket<LongTerms.Bucket>
- Throws:
-
getKeyAsString
public getKeyAsString()- Returns:
- The key associated with the bucket as a string
-
getKey
public getKey()- Returns:
- The key associated with the bucket
-
getKeyAsNumber
public getKeyAsNumber() -
compareKey
Description copied from interface:KeyComparable
Compare thisMultiBucketsAggregation.Bucket
skey
with 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
protected final org.elasticsearch.common.xcontent.XContentBuilder keyToXContent(org.elasticsearch.common.xcontent.XContentBuilder builder) throws- Specified by:
keyToXContent
in classInternalTerms.Bucket<LongTerms.Bucket>
- Throws:
-
equals
public boolean equals( obj)- Overrides:
equals
in classInternalTerms.Bucket<LongTerms.Bucket>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classInternalTerms.Bucket<LongTerms.Bucket>
-