public abstract class InternalMappedTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>> extends InternalTerms<A,B>
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 java.util.Map<java.lang.String,B> |
bucketMap |
protected java.util.List<B> |
buckets |
protected long |
docCountError |
protected DocValueFormat |
format |
protected long |
otherDocCount |
protected int |
shardSize |
protected boolean |
showTermDocCountError |
DOC_COUNT_ERROR_UPPER_BOUND_FIELD_NAME, minDocCount, order, requiredSize, SUM_OF_OTHER_DOC_COUNTS
metaData, name
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
InternalMappedTerms(StreamInput in,
InternalTerms.Bucket.Reader<B> bucketReader)
Read from a stream.
|
protected |
InternalMappedTerms(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,
DocValueFormat format,
int shardSize,
boolean showTermDocCountError,
long otherDocCount,
java.util.List<B> buckets,
long docCountError) |
Modifier and Type | Method and Description |
---|---|
B |
getBucketByKey(java.lang.String term)
Get the bucket for the given term, or null if there is no such bucket.
|
java.util.List<B> |
getBucketsInternal() |
long |
getDocCountError()
Get an upper bound of the error on document counts in this aggregation.
|
protected int |
getShardSize() |
long |
getSumOfOtherDocCounts()
Return the sum of the document counts of all buckets that did not make
it to the top buckets.
|
protected void |
setDocCountError(long docCountError) |
protected void |
writeTermTypeInfoTo(StreamOutput out) |
create, createBucketsArray, doReduce, doWriteTo, getBuckets
create, createBucket, getProperty
doXContentBody, getMetaData, getName, getProperty, pipelineAggregators, readSize, reduce, toXContent, writeSize, writeTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetaData, getName, getProperty
toXContent
getWriteableName
protected final DocValueFormat format
protected final int shardSize
protected final boolean showTermDocCountError
protected final long otherDocCount
protected final java.util.List<B extends InternalTerms.Bucket<B>> buckets
protected java.util.Map<java.lang.String,B extends InternalTerms.Bucket<B>> bucketMap
protected long docCountError
protected InternalMappedTerms(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, DocValueFormat format, int shardSize, boolean showTermDocCountError, long otherDocCount, java.util.List<B> buckets, long docCountError)
protected InternalMappedTerms(StreamInput in, InternalTerms.Bucket.Reader<B> bucketReader) throws java.io.IOException
java.io.IOException
protected final void writeTermTypeInfoTo(StreamOutput out) throws java.io.IOException
writeTermTypeInfoTo
in class InternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
java.io.IOException
protected void setDocCountError(long docCountError)
setDocCountError
in class InternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
protected int getShardSize()
getShardSize
in class InternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
public long getDocCountError()
Terms
public long getSumOfOtherDocCounts()
Terms
public java.util.List<B> getBucketsInternal()
getBucketsInternal
in class InternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
public B getBucketByKey(java.lang.String term)
Terms
getBucketByKey
in interface Terms
getBucketByKey
in class InternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>