public abstract class InternalTerms<A extends InternalTerms,B extends InternalTerms.Bucket> extends InternalMultiBucketAggregation<A,B> implements Terms, ToXContent, Streamable
Modifier and Type | Class and Description |
---|---|
static class |
InternalTerms.Bucket |
InternalMultiBucketAggregation.InternalBucket
InternalAggregation.CommonFields, InternalAggregation.ReduceContext, InternalAggregation.Type
Terms.Order, Terms.ValueType
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
protected Map<String,InternalTerms.Bucket> |
bucketMap |
protected List<? extends InternalTerms.Bucket> |
buckets |
protected static String |
DOC_COUNT_ERROR_UPPER_BOUND_FIELD_NAME |
protected long |
docCountError |
protected long |
minDocCount |
protected Terms.Order |
order |
protected long |
otherDocCount |
protected int |
requiredSize |
protected int |
shardSize |
protected boolean |
showTermDocCountError |
protected static String |
SUM_OF_OTHER_DOC_COUNTS |
metaData, name
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
InternalTerms() |
protected |
InternalTerms(String name,
Terms.Order order,
int requiredSize,
int shardSize,
long minDocCount,
List<? extends InternalTerms.Bucket> buckets,
boolean showTermDocCountError,
long docCountError,
long otherDocCount,
List<PipelineAggregator> pipelineAggregators,
Map<String,Object> metaData) |
Modifier and Type | Method and Description |
---|---|
protected abstract A |
create(String name,
List<InternalTerms.Bucket> buckets,
long docCountError,
long otherDocCount,
InternalTerms prototype) |
InternalAggregation |
doReduce(List<InternalAggregation> aggregations,
InternalAggregation.ReduceContext reduceContext) |
Terms.Bucket |
getBucketByKey(String term)
Get the bucket for the given term, or null if there is no such bucket.
|
List<Terms.Bucket> |
getBuckets()
Return the sorted list of the buckets in this terms aggregation.
|
long |
getDocCountError()
Get an upper bound of the error on document counts in this aggregation.
|
long |
getSumOfOtherDocCounts()
Return the sum of the document counts of all buckets that did not make
it to the top buckets.
|
create, createBucket, getProperty
doReadFrom, doWriteTo, doXContentBody, getMetaData, getName, getProperty, pipelineAggregators, readFrom, readSize, reduce, toXContent, type, writeSize, writeTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetaData, getName, getProperty
toXContent
readFrom, writeTo
protected static final String DOC_COUNT_ERROR_UPPER_BOUND_FIELD_NAME
protected static final String SUM_OF_OTHER_DOC_COUNTS
protected Terms.Order order
protected int requiredSize
protected int shardSize
protected long minDocCount
protected List<? extends InternalTerms.Bucket> buckets
protected Map<String,InternalTerms.Bucket> bucketMap
protected long docCountError
protected boolean showTermDocCountError
protected long otherDocCount
protected InternalTerms()
protected InternalTerms(String name, Terms.Order order, int requiredSize, int shardSize, long minDocCount, List<? extends InternalTerms.Bucket> buckets, boolean showTermDocCountError, long docCountError, long otherDocCount, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData)
public List<Terms.Bucket> getBuckets()
Terms
getBuckets
in interface MultiBucketsAggregation
getBuckets
in interface Terms
public Terms.Bucket getBucketByKey(String term)
Terms
getBucketByKey
in interface Terms
public long getDocCountError()
Terms
getDocCountError
in interface Terms
public long getSumOfOtherDocCounts()
Terms
getSumOfOtherDocCounts
in interface Terms
public InternalAggregation doReduce(List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
doReduce
in class InternalAggregation
protected abstract A create(String name, List<InternalTerms.Bucket> buckets, long docCountError, long otherDocCount, InternalTerms prototype)
Copyright © 2009–2017. All rights reserved.