NamedWriteable
, Writeable
, ToXContent
, ToXContentFragment
, Aggregation
, MultiBucketsAggregation
, Terms
DoubleTerms
, LongTerms
, StringTerms
public abstract class InternalMappedTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>> extends InternalTerms<A,B>
Aggregation.CommonFields
InternalAggregation.ReduceContext
InternalMultiBucketAggregation.InternalBucket
InternalTerms.Bucket<B extends InternalTerms.Bucket<B>>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | 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 |
TYPED_KEYS_DELIMITER
metaData, name
DOC_COUNT_ERROR_UPPER_BOUND_FIELD_NAME, minDocCount, order, requiredSize, SUM_OF_OTHER_DOC_COUNTS
EMPTY_PARAMS
Modifier | Constructor | Description |
---|---|---|
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) |
Read from a stream.
|
Modifier and Type | Method | 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) |
getMetaData, getName, getType
equals, getMetaData, getName, getProperty, getType, hashCode, pipelineAggregators, readSize, reduce, toString, toXContent, writeSize, writeTo
countInnerBucket, countInnerBucket, create, createBucket, getProperty
create, createBucketsArray, doReduce, doWriteTo, doXContentCommon
getWriteableName
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
toXContent
isFragment
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, 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.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> getBuckets()
Terms
getBuckets
in interface MultiBucketsAggregation
getBuckets
in interface Terms
getBuckets
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>>
protected boolean doEquals(java.lang.Object obj)
InternalAggregation
InternalAggregation.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 this
doEquals
in class InternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
protected int doHashCode()
InternalAggregation
InternalAggregation.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 InternalAggregation
java.io.IOException