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,MultiBucketsAggregation.Bucket,Terms.Bucket,HasAggregations,KeyComparable<B>,ToXContent
- 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
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInternalTerms.Bucket.Reader<B extends InternalTerms.Bucket<B>>Reads a bucket.Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected InternalAggregationsprotected longprotected longprotected final DocValueFormatprotected final booleanFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBucket(long docCount, InternalAggregations aggregations, boolean showDocCountError, long docCountError, DocValueFormat formatter) protectedBucket(StreamInput in, DocValueFormat formatter, boolean showDocCountError) Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionbooleanlonglongprotected booleaninthashCode()protected abstract XContentBuilderkeyToXContent(XContentBuilder builder) protected voidsetDocCountError(long docCountError) final XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params) protected voidupdateDocCountError(long docCountErrorDiff) protected abstract voidwriteTermTo(StreamOutput out) final voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
getPropertyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.KeyComparable
compareKeyMethods inherited from interface org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation.Bucket
getKey, getKeyAsStringMethods inherited from interface org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket
getKeyAsNumberMethods inherited from interface org.elasticsearch.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 IOException Read from a stream.- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
writeTermTo
- Throws:
IOException
-
getDocCount
public long getDocCount()- Specified by:
getDocCountin interfaceMultiBucketsAggregation.Bucket- Returns:
- The number of documents that fall within this bucket
-
getDocCountError
public long getDocCountError()- Specified by:
getDocCountErrorin interfaceTerms.Bucket- Specified by:
getDocCountErrorin classAbstractInternalTerms.AbstractTermsBucket
-
setDocCountError
protected void setDocCountError(long docCountError) - Specified by:
setDocCountErrorin classAbstractInternalTerms.AbstractTermsBucket
-
updateDocCountError
protected void updateDocCountError(long docCountErrorDiff) - Specified by:
updateDocCountErrorin classAbstractInternalTerms.AbstractTermsBucket
-
getShowDocCountError
protected boolean getShowDocCountError()- Specified by:
getShowDocCountErrorin classAbstractInternalTerms.AbstractTermsBucket
-
getAggregations
- Specified by:
getAggregationsin interfaceHasAggregations- Specified by:
getAggregationsin interfaceMultiBucketsAggregation.Bucket- Returns:
- The sub-aggregations of this bucket
-
toXContent
public final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
keyToXContent
- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-