Class InternalMappedTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
java.lang.Object
org.elasticsearch.search.aggregations.InternalAggregation
org.elasticsearch.search.aggregations.InternalMultiBucketAggregation<A,B>
org.elasticsearch.search.aggregations.bucket.terms.AbstractInternalTerms<A,B>
org.elasticsearch.search.aggregations.bucket.terms.InternalTerms<A,B>
org.elasticsearch.search.aggregations.bucket.terms.InternalMappedTerms<A,B>
- All Implemented Interfaces:
NamedWriteable
,Writeable
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
,Aggregation
,MultiBucketsAggregation
,Terms
- Direct Known Subclasses:
DoubleTerms
,LongTerms
,StringTerms
public abstract class InternalMappedTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
extends InternalTerms<A,B>
Common superclass for results of the terms aggregation on mapped fields.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.bucket.terms.InternalTerms
InternalTerms.Bucket<B extends InternalTerms.Bucket<B>>
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.bucket.terms.AbstractInternalTerms
AbstractInternalTerms.AbstractTermsBucket
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation
InternalMultiBucketAggregation.InternalBucket
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalAggregation
InternalAggregation.ReduceContext, InternalAggregation.ReduceContextBuilder
Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
Aggregation.CommonFields
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionprotected long
protected DocValueFormat
protected long
protected int
protected boolean
Fields inherited from class org.elasticsearch.search.aggregations.bucket.terms.InternalTerms
DOC_COUNT_ERROR_UPPER_BOUND_FIELD_NAME, minDocCount, order, reduceOrder, requiredSize, SUM_OF_OTHER_DOC_COUNTS
Fields inherited from class org.elasticsearch.search.aggregations.InternalAggregation
metadata, name
Fields inherited from interface org.elasticsearch.search.aggregations.Aggregation
TYPED_KEYS_DELIMITER
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ModifierConstructorDescriptionprotected
InternalMappedTerms(String name, BucketOrder reduceOrder, BucketOrder order, int requiredSize, long minDocCount, Map<String,Object> metadata, DocValueFormat format, int shardSize, boolean showTermDocCountError, long otherDocCount, List<B> buckets, long docCountError)
protected
InternalMappedTerms(StreamInput in, InternalTerms.Bucket.Reader<B> bucketReader)
Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionorg.elasticsearch.common.xcontent.XContentBuilder
doXContentBody(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
boolean
getBucketByKey(String term)
Get the bucket for the given term, or null if there is no such bucket.Return the sorted list of the buckets in this terms aggregation.long
Get an upper bound of the error on document counts in this aggregation.protected int
long
Return the sum of the document counts of all buckets that did not make it to the top buckets.int
hashCode()
protected void
setDocCountError(long docCountError)
protected void
Methods inherited from class org.elasticsearch.search.aggregations.bucket.terms.InternalTerms
create, doWriteTo, getMinDocCount, getOrder, getReduceOrder, getRequiredSize
Methods inherited from class org.elasticsearch.search.aggregations.bucket.terms.AbstractInternalTerms
createBucket, doXContentCommon, reduce, reduceBucket
Methods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation
copyWithRewritenBuckets, countInnerBucket, countInnerBucket, create, createBucket, forEachBucket, getProperty, mustReduceOnSingleInternalAgg, reducePipelines
Methods inherited from class org.elasticsearch.search.aggregations.InternalAggregation
getMetadata, getName, getProperty, getType, isMapped, mergePipelineTreeForBWCSerialization, pipelineAggregatorsForBwcSerialization, readSize, sortValue, sortValue, toString, toXContent, writeSize, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.search.aggregations.Aggregation
getMetadata, getName, getType
Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableName
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContent
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
format
-
shardSize
protected final int shardSize -
showTermDocCountError
protected final boolean showTermDocCountError -
otherDocCount
protected final long otherDocCount -
buckets
-
bucketMap
-
docCountError
protected long docCountError
-
-
Constructor Details
-
InternalMappedTerms
protected InternalMappedTerms(String name, BucketOrder reduceOrder, BucketOrder order, int requiredSize, long minDocCount, Map<String,Object> metadata, DocValueFormat format, int shardSize, boolean showTermDocCountError, long otherDocCount, List<B> buckets, long docCountError) -
InternalMappedTerms
protected InternalMappedTerms(StreamInput in, InternalTerms.Bucket.Reader<B> bucketReader) throws IOExceptionRead from a stream.- Throws:
IOException
-
-
Method Details
-
writeTermTypeInfoTo
- Specified by:
writeTermTypeInfoTo
in classInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
- Throws:
IOException
-
setDocCountError
protected void setDocCountError(long docCountError)- Specified by:
setDocCountError
in classInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
-
getShardSize
protected int getShardSize()- Specified by:
getShardSize
in classInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
-
getDocCountError
public long getDocCountError()Description copied from interface:Terms
Get an upper bound of the error on document counts in this aggregation.- Specified by:
getDocCountError
in interfaceTerms
- Specified by:
getDocCountError
in classAbstractInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
-
getSumOfOtherDocCounts
public long getSumOfOtherDocCounts()Description copied from interface:Terms
Return the sum of the document counts of all buckets that did not make it to the top buckets.- Specified by:
getSumOfOtherDocCounts
in interfaceTerms
- Specified by:
getSumOfOtherDocCounts
in classAbstractInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
-
getBuckets
Description copied from interface:Terms
Return the sorted list of the buckets in this terms aggregation.- Specified by:
getBuckets
in interfaceMultiBucketsAggregation
- Specified by:
getBuckets
in interfaceTerms
- Specified by:
getBuckets
in classInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
- Returns:
- The buckets of this aggregation.
-
getBucketByKey
Description copied from interface:Terms
Get the bucket for the given term, or null if there is no such bucket.- Specified by:
getBucketByKey
in interfaceTerms
- Specified by:
getBucketByKey
in classInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
-
equals
- Overrides:
equals
in classInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
-
doXContentBody
public final org.elasticsearch.common.xcontent.XContentBuilder doXContentBody(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
doXContentBody
in classInternalAggregation
- Throws:
IOException
-