Class InternalTerms.Bucket<B extends InternalTerms.Bucket<B>>
java.lang.Object
org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
org.elasticsearch.search.aggregations.bucket.terms.AbstractInternalTerms.AbstractTermsBucket
org.elasticsearch.search.aggregations.bucket.terms.InternalTerms.Bucket<B>
- All Implemented Interfaces:
Writeable
,org.elasticsearch.common.xcontent.ToXContent
,MultiBucketsAggregation.Bucket
,Terms.Bucket
,HasAggregations
,KeyComparable<B>
- Direct Known Subclasses:
LongTerms.Bucket
,StringTerms.Bucket
,UnmappedTerms.Bucket
- Enclosing class:
- InternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
public abstract static class InternalTerms.Bucket<B extends InternalTerms.Bucket<B>>
extends AbstractInternalTerms.AbstractTermsBucket
implements Terms.Bucket, KeyComparable<B>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
InternalTerms.Bucket.Reader<B extends InternalTerms.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
Modifier and TypeFieldDescriptionprotected InternalAggregations
protected long
protected long
protected DocValueFormat
protected boolean
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ModifierConstructorDescriptionprotected
Bucket(long docCount, InternalAggregations aggregations, boolean showDocCountError, long docCountError, DocValueFormat formatter)
protected
Bucket(StreamInput in, DocValueFormat formatter, boolean showDocCountError)
Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionboolean
long
long
protected boolean
int
hashCode()
protected abstract org.elasticsearch.common.xcontent.XContentBuilder
keyToXContent(org.elasticsearch.common.xcontent.XContentBuilder builder)
protected void
setDocCountError(long docCountError)
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
protected void
updateDocCountError(long docCountErrorDiff)
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.Terms.Bucket
getKeyAsNumber
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
isFragment
-
Field Details
-
docCount
protected long docCount -
docCountError
protected long docCountError -
aggregations
-
showDocCountError
protected final boolean showDocCountError -
format
-
-
Constructor Details
-
Bucket
protected Bucket(long docCount, InternalAggregations aggregations, boolean showDocCountError, long docCountError, DocValueFormat formatter) -
Bucket
protected Bucket(StreamInput in, DocValueFormat formatter, boolean showDocCountError) throws IOExceptionRead from a stream.- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
writeTermTo
- Throws:
IOException
-
getDocCount
public long getDocCount()- Specified by:
getDocCount
in interfaceMultiBucketsAggregation.Bucket
- Returns:
- The number of documents that fall within this bucket
-
getDocCountError
public long getDocCountError()- Specified by:
getDocCountError
in interfaceTerms.Bucket
- Specified by:
getDocCountError
in classAbstractInternalTerms.AbstractTermsBucket
-
setDocCountError
protected void setDocCountError(long docCountError)- Specified by:
setDocCountError
in classAbstractInternalTerms.AbstractTermsBucket
-
updateDocCountError
protected void updateDocCountError(long docCountErrorDiff)- Specified by:
updateDocCountError
in classAbstractInternalTerms.AbstractTermsBucket
-
getShowDocCountError
protected boolean getShowDocCountError()- Specified by:
getShowDocCountError
in classAbstractInternalTerms.AbstractTermsBucket
-
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 IOException- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
IOException
-
keyToXContent
protected abstract org.elasticsearch.common.xcontent.XContentBuilder keyToXContent(org.elasticsearch.common.xcontent.XContentBuilder builder) throws IOException- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-