Module org.elasticsearch.server
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<B>
org.elasticsearch.search.aggregations.bucket.terms.InternalTerms.Bucket<B>
- All Implemented Interfaces:
MultiBucketsAggregation.Bucket,Terms.Bucket,HasAggregations,KeyComparable<B>
- Direct Known Subclasses:
DoubleTerms.Bucket,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<B>
implements Terms.Bucket
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInternalTerms.Bucket.Reader<B extends InternalTerms.Bucket<B>>Reads a bucket. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected InternalAggregationsprotected longprotected final DocValueFormat -
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 TypeMethodDescriptionfinal voidbucketToXContent(XContentBuilder builder, ToXContent.Params params, boolean showDocCountError) booleanlonglonginthashCode()protected abstract XContentBuilderkeyToXContent(XContentBuilder builder) voidsetAggregations(InternalAggregations aggregations) voidsetDocCount(long docCount) voidsetDocCountError(long docCountError) protected voidupdateDocCountError(long docCountErrorDiff) protected abstract voidwriteTermTo(StreamOutput out) 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
getKeyAsNumber
-
Field Details
-
docCount
protected long docCount -
aggregations
-
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
-
writeTermTo
- Throws:
IOException
-
getDocCount
public long getDocCount()- Specified by:
getDocCountin interfaceMultiBucketsAggregation.Bucket- Returns:
- The number of documents that fall within this bucket
-
setDocCount
public void setDocCount(long docCount) -
getDocCountError
public long getDocCountError()- Specified by:
getDocCountErrorin interfaceTerms.Bucket- Specified by:
getDocCountErrorin classAbstractInternalTerms.AbstractTermsBucket<B extends InternalTerms.Bucket<B>>
-
setDocCountError
public void setDocCountError(long docCountError) - Specified by:
setDocCountErrorin classAbstractInternalTerms.AbstractTermsBucket<B extends InternalTerms.Bucket<B>>
-
updateDocCountError
protected void updateDocCountError(long docCountErrorDiff) - Specified by:
updateDocCountErrorin classAbstractInternalTerms.AbstractTermsBucket<B extends InternalTerms.Bucket<B>>
-
getAggregations
- Specified by:
getAggregationsin interfaceHasAggregations- Specified by:
getAggregationsin interfaceMultiBucketsAggregation.Bucket- Returns:
- The sub-aggregations of this bucket
-
setAggregations
-
bucketToXContent
public final void bucketToXContent(XContentBuilder builder, ToXContent.Params params, boolean showDocCountError) throws IOException - Specified by:
bucketToXContentin classAbstractInternalTerms.AbstractTermsBucket<B extends InternalTerms.Bucket<B>>- Throws:
IOException
-
keyToXContent
- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-