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.ReduceContext
Terms.Order
Aggregation.CommonFields
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.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, name
TYPED_KEYS_DELIMITER
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) |
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, getProperty
doXContentBody, getMetaData, getName, getProperty, getType, pipelineAggregators, readSize, reduce, toXContent, writeSize, writeTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDocCountError, getSumOfOtherDocCounts
getMetaData, getName, getType
isFragment, toXContent
getWriteableName
protected 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.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 abstract java.util.List<B> getBuckets()
Terms
getBuckets
in interface MultiBucketsAggregation
getBuckets
in interface Terms
getBuckets
in class InternalMultiBucketAggregation<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
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)
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