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.InternalBucket
InternalAggregation.CommonFields, InternalAggregation.ReduceContext, InternalAggregation.Type
Terms.Order, Terms.ValueType
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
DOC_COUNT_ERROR_UPPER_BOUND_FIELD_NAME |
protected long |
minDocCount |
protected Terms.Order |
order |
protected int |
requiredSize |
protected static java.lang.String |
SUM_OF_OTHER_DOC_COUNTS |
metaData, name
EMPTY_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) |
abstract B |
getBucketByKey(java.lang.String term)
Get the bucket for the given term, or null if there is no such bucket.
|
java.util.List<Terms.Bucket> |
getBuckets()
Return the sorted list of the buckets in this terms aggregation.
|
protected abstract java.util.List<B> |
getBucketsInternal() |
protected abstract int |
getShardSize() |
protected abstract void |
setDocCountError(long docCountError) |
protected abstract void |
writeTermTypeInfoTo(StreamOutput out) |
create, createBucket, getProperty
doXContentBody, getMetaData, getName, getProperty, pipelineAggregators, readSize, reduce, toXContent, writeSize, writeTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDocCountError, getSumOfOtherDocCounts
getMetaData, getName, getProperty
toXContent
getWriteableName
protected static final java.lang.String DOC_COUNT_ERROR_UPPER_BOUND_FIELD_NAME
protected static final java.lang.String 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.IOException
protected final void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class InternalAggregation
java.io.IOException
protected abstract void writeTermTypeInfoTo(StreamOutput out) throws java.io.IOException
java.io.IOException
public final java.util.List<Terms.Bucket> getBuckets()
Terms
getBuckets
in interface MultiBucketsAggregation
getBuckets
in interface Terms
protected abstract java.util.List<B> getBucketsInternal()
public abstract B getBucketByKey(java.lang.String term)
Terms
getBucketByKey
in interface Terms
public InternalAggregation doReduce(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
doReduce
in class InternalAggregation
protected 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)