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.InternalBucketInternalAggregation.ReduceContextAggregation.CommonFieldsToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.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_COUNTSmetaData, nameTYPED_KEYS_DELIMITEREMPTY_PARAMS| Modifier | Constructor and Description |
|---|---|
protected |
InternalMappedTerms(StreamInput in,
InternalTerms.Bucket.Reader<B> bucketReader)
Read from a stream.
|
protected |
InternalMappedTerms(java.lang.String name,
BucketOrder 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 |
|---|---|
protected boolean |
doEquals(java.lang.Object obj)
Opportunity for subclasses to add criteria to the
InternalAggregation.equals(Object)
method for this class. |
protected int |
doHashCode()
Opportunity for subclasses to the
InternalAggregation.hashCode() for this
class. |
XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
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> |
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.
|
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, doXContentCommoncreate, createBucket, getPropertyequals, getMetaData, getName, getProperty, getType, hashCode, pipelineAggregators, readSize, reduce, toString, toXContent, writeSize, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetMetaData, getName, getTypeisFragmenttoXContentgetWriteableNameprotected 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,
BucketOrder 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.IOExceptionprotected 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.IOExceptionprotected 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()
Termspublic long getSumOfOtherDocCounts()
Termspublic java.util.List<B> getBuckets()
TermsgetBuckets in interface MultiBucketsAggregationgetBuckets in interface TermsgetBuckets in class InternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>public B getBucketByKey(java.lang.String term)
TermsgetBucketByKey in interface TermsgetBucketByKey in class InternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>protected boolean doEquals(java.lang.Object obj)
InternalAggregationInternalAggregation.equals(Object)
method for this class.
This method can safely cast obj to the subclass since the
InternalAggregation.equals(Object) method checks that obj is the same
class as thisdoEquals in class InternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>protected int doHashCode()
InternalAggregationInternalAggregation.hashCode() for this
class.doHashCode in class InternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>public final XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContentBody in class InternalAggregationjava.io.IOException