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.TypeTerms.Order, Terms.ValueTypeToXContent.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 |
nameEMPTY_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, writeSizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNametoXContentreadFrom, writeToprotected 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()
TermsgetBuckets in interface MultiBucketsAggregationgetBuckets in interface Termspublic Terms.Bucket getBucketByKey(String term)
TermsgetBucketByKey in interface MultiBucketsAggregationgetBucketByKey in interface Termsterm - The key of the requested bucket.public long getDocCountError()
TermsgetDocCountError in interface Termspublic long getSumOfOtherDocCounts()
TermsgetSumOfOtherDocCounts in interface Termspublic InternalAggregation reduce(InternalAggregation.ReduceContext reduceContext)
InternalAggregationreduce in class InternalAggregationprotected abstract InternalTerms newAggregation(String name, List<InternalTerms.Bucket> buckets, boolean showTermDocCountError, long docCountError, long otherDocCount)
Copyright © 2009–2016. All rights reserved.