Class InternalRareTerms.Bucket<B extends InternalRareTerms.Bucket<B>>
java.lang.Object
org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
org.elasticsearch.search.aggregations.bucket.terms.InternalRareTerms.Bucket<B>
- All Implemented Interfaces:
Writeable
,org.elasticsearch.common.xcontent.ToXContent
,MultiBucketsAggregation.Bucket
,RareTerms.Bucket
,HasAggregations
,KeyComparable<B>
- Direct Known Subclasses:
LongRareTerms.Bucket
,StringRareTerms.Bucket
,UnmappedRareTerms.Bucket
- Enclosing class:
- InternalRareTerms<A extends InternalRareTerms<A,B>,B extends InternalRareTerms.Bucket<B>>
public abstract static class InternalRareTerms.Bucket<B extends InternalRareTerms.Bucket<B>> extends InternalMultiBucketAggregation.InternalBucket implements RareTerms.Bucket, KeyComparable<B>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
InternalRareTerms.Bucket.Reader<B extends InternalRareTerms.Bucket<B>>
Reads a bucket.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 Modifier and Type Field Description protected InternalAggregations
aggregations
protected long
docCount
protected DocValueFormat
format
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
Constructors Modifier Constructor Description protected
Bucket(long docCount, InternalAggregations aggregations, DocValueFormat formatter)
protected
Bucket(StreamInput in, DocValueFormat formatter)
Read from a stream. -
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Aggregations
getAggregations()
long
getDocCount()
int
hashCode()
protected abstract org.elasticsearch.common.xcontent.XContentBuilder
keyToXContent(org.elasticsearch.common.xcontent.XContentBuilder builder)
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
protected abstract void
writeTermTo(StreamOutput out)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.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.KeyComparable
compareKey
Methods inherited from interface org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation.Bucket
getKey, getKeyAsString
Methods inherited from interface org.elasticsearch.search.aggregations.bucket.terms.RareTerms.Bucket
getKeyAsNumber
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
isFragment
-
Field Details
-
docCount
protected long docCount -
aggregations
-
format
-
-
Constructor Details
-
Bucket
-
Bucket
Read from a stream.- Throws:
java.io.IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput. -
writeTermTo
- Throws:
java.io.IOException
-
getDocCount
public long getDocCount()- Specified by:
getDocCount
in interfaceMultiBucketsAggregation.Bucket
- Returns:
- The number of documents that fall within this bucket
-
getAggregations
- Specified by:
getAggregations
in interfaceHasAggregations
- Specified by:
getAggregations
in interfaceMultiBucketsAggregation.Bucket
- Returns:
- The sub-aggregations of this bucket
-
toXContent
public final org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
java.io.IOException
-
keyToXContent
protected abstract org.elasticsearch.common.xcontent.XContentBuilder keyToXContent(org.elasticsearch.common.xcontent.XContentBuilder builder) throws java.io.IOException- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-