public abstract class InternalTerms extends InternalAggregation implements Terms, ToXContent, Streamable
Modifier and Type | Class and Description |
---|---|
static class |
InternalTerms.Bucket |
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<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 |
name
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
InternalTerms() |
protected |
InternalTerms(String name,
Terms.Order order,
int requiredSize,
int shardSize,
long minDocCount,
List<InternalTerms.Bucket> buckets,
boolean showTermDocCountError,
long docCountError,
long otherDocCount) |
Modifier and Type | Method and Description |
---|---|
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.
|
protected abstract InternalTerms |
newAggregation(String name,
List<InternalTerms.Bucket> buckets,
boolean showTermDocCountError,
long docCountError,
long otherDocCount) |
InternalAggregation |
reduce(InternalAggregation.ReduceContext reduceContext)
Reduces the given addAggregation to a single one and returns it.
|
doXContentBody, getName, readSize, toXContent, type, writeSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
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<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<InternalTerms.Bucket> buckets, boolean showTermDocCountError, long docCountError, long otherDocCount)
public List<Terms.Bucket> getBuckets()
Terms
getBuckets
in interface MultiBucketsAggregation
getBuckets
in interface Terms
public Terms.Bucket getBucketByKey(String term)
Terms
getBucketByKey
in interface MultiBucketsAggregation
getBucketByKey
in interface Terms
term
- The key of the requested bucket.public long getDocCountError()
Terms
getDocCountError
in interface Terms
public long getSumOfOtherDocCounts()
Terms
getSumOfOtherDocCounts
in interface Terms
public InternalAggregation reduce(InternalAggregation.ReduceContext reduceContext)
InternalAggregation
reduce
in class InternalAggregation
protected abstract InternalTerms newAggregation(String name, List<InternalTerms.Bucket> buckets, boolean showTermDocCountError, long docCountError, long otherDocCount)
Copyright © 2009–2015. All rights reserved.