public abstract class InternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>> extends InternalMultiBucketAggregation<A,B> implements Terms, ToXContent
| Modifier and Type | Class and Description |
|---|---|
static class |
InternalTerms.Bucket<B extends InternalTerms.Bucket<B>> |
InternalMultiBucketAggregation.InternalBucketInternalAggregation.ReduceContextTerms.OrderAggregation.CommonFieldsToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field and Description |
|---|---|
protected static ParseField |
DOC_COUNT_ERROR_UPPER_BOUND_FIELD_NAME |
protected long |
minDocCount |
protected Terms.Order |
order |
protected int |
requiredSize |
protected static ParseField |
SUM_OF_OTHER_DOC_COUNTS |
metaData, nameTYPED_KEYS_DELIMITEREMPTY_PARAMS| Modifier | Constructor and Description |
|---|---|
protected |
InternalTerms(StreamInput in)
Read from a stream.
|
protected |
InternalTerms(java.lang.String name,
Terms.Order order,
int requiredSize,
long minDocCount,
java.util.List<PipelineAggregator> pipelineAggregators,
java.util.Map<java.lang.String,java.lang.Object> metaData) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract A |
create(java.lang.String name,
java.util.List<B> buckets,
long docCountError,
long otherDocCount) |
protected abstract B[] |
createBucketsArray(int size)
Create an array to hold some buckets.
|
InternalAggregation |
doReduce(java.util.List<InternalAggregation> aggregations,
InternalAggregation.ReduceContext reduceContext) |
protected void |
doWriteTo(StreamOutput out) |
protected static XContentBuilder |
doXContentCommon(XContentBuilder builder,
ToXContent.Params params,
long docCountError,
long otherDocCount,
java.util.List<? extends InternalTerms.Bucket> buckets) |
abstract B |
getBucketByKey(java.lang.String term)
Get the bucket for the given term, or null if there is no such bucket.
|
abstract java.util.List<B> |
getBuckets()
Return the sorted list of the buckets in this terms aggregation.
|
protected abstract int |
getShardSize() |
protected abstract void |
setDocCountError(long docCountError) |
protected abstract void |
writeTermTypeInfoTo(StreamOutput out) |
create, createBucket, getPropertydoXContentBody, getMetaData, getName, getProperty, getType, pipelineAggregators, readSize, reduce, toXContent, writeSize, writeToclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDocCountError, getSumOfOtherDocCountsgetMetaData, getName, getTypeisFragment, toXContentgetWriteableNameprotected static final ParseField DOC_COUNT_ERROR_UPPER_BOUND_FIELD_NAME
protected static final ParseField SUM_OF_OTHER_DOC_COUNTS
protected final Terms.Order order
protected final int requiredSize
protected final long minDocCount
protected InternalTerms(java.lang.String name,
Terms.Order order,
int requiredSize,
long minDocCount,
java.util.List<PipelineAggregator> pipelineAggregators,
java.util.Map<java.lang.String,java.lang.Object> metaData)
protected InternalTerms(StreamInput in) throws java.io.IOException
java.io.IOExceptionprotected final void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo in class InternalAggregationjava.io.IOExceptionprotected abstract void writeTermTypeInfoTo(StreamOutput out) throws java.io.IOException
java.io.IOExceptionpublic abstract java.util.List<B> getBuckets()
TermsgetBuckets in interface MultiBucketsAggregationgetBuckets in interface TermsgetBuckets in class InternalMultiBucketAggregation<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>public abstract B getBucketByKey(java.lang.String term)
TermsgetBucketByKey in interface Termspublic InternalAggregation doReduce(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
doReduce in class InternalAggregationprotected abstract void setDocCountError(long docCountError)
protected abstract int getShardSize()
protected abstract A create(java.lang.String name, java.util.List<B> buckets, long docCountError, long otherDocCount)
protected abstract B[] createBucketsArray(int size)
protected static XContentBuilder doXContentCommon(XContentBuilder builder, ToXContent.Params params, long docCountError, long otherDocCount, java.util.List<? extends InternalTerms.Bucket> buckets) throws java.io.IOException
java.io.IOException