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.AbstractTermsBucketNested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation
InternalMultiBucketAggregation.InternalBucketNested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalAggregation
InternalAggregation.ReduceContext, InternalAggregation.ReduceContextBuilderNested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
Aggregation.CommonFieldsNested 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.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected DocValueFormatprotected longprotected intprotected booleanFields 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_COUNTSFields inherited from class org.elasticsearch.search.aggregations.InternalAggregation
metadata, nameFields inherited from interface org.elasticsearch.search.aggregations.Aggregation
TYPED_KEYS_DELIMITERFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInternalMappedTerms(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)protectedInternalMappedTerms(StreamInput in, InternalTerms.Bucket.Reader<B> bucketReader)Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionorg.elasticsearch.common.xcontent.XContentBuilderdoXContentBody(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)booleangetBucketByKey(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.longGet an upper bound of the error on document counts in this aggregation.protected intlongReturn the sum of the document counts of all buckets that did not make it to the top buckets.inthashCode()protected voidsetDocCountError(long docCountError)protected voidMethods inherited from class org.elasticsearch.search.aggregations.bucket.terms.InternalTerms
create, doWriteTo, getMinDocCount, getOrder, getReduceOrder, getRequiredSizeMethods inherited from class org.elasticsearch.search.aggregations.bucket.terms.AbstractInternalTerms
createBucket, doXContentCommon, reduce, reduceBucketMethods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation
copyWithRewritenBuckets, countInnerBucket, countInnerBucket, create, createBucket, forEachBucket, getProperty, mustReduceOnSingleInternalAgg, reducePipelinesMethods inherited from class org.elasticsearch.search.aggregations.InternalAggregation
getMetadata, getName, getProperty, getType, isMapped, mergePipelineTreeForBWCSerialization, pipelineAggregatorsForBwcSerialization, readSize, sortValue, sortValue, toString, toXContent, writeSize, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.Aggregation
getMetadata, getName, getTypeMethods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableNameMethods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContentMethods 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:
writeTermTypeInfoToin classInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>- Throws:
IOException
-
setDocCountError
protected void setDocCountError(long docCountError)- Specified by:
setDocCountErrorin classInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
-
getShardSize
protected int getShardSize()- Specified by:
getShardSizein classInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
-
getDocCountError
public long getDocCountError()Description copied from interface:TermsGet an upper bound of the error on document counts in this aggregation.- Specified by:
getDocCountErrorin interfaceTerms- Specified by:
getDocCountErrorin classAbstractInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
-
getSumOfOtherDocCounts
public long getSumOfOtherDocCounts()Description copied from interface:TermsReturn the sum of the document counts of all buckets that did not make it to the top buckets.- Specified by:
getSumOfOtherDocCountsin interfaceTerms- Specified by:
getSumOfOtherDocCountsin classAbstractInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
-
getBuckets
Description copied from interface:TermsReturn the sorted list of the buckets in this terms aggregation.- Specified by:
getBucketsin interfaceMultiBucketsAggregation- Specified by:
getBucketsin interfaceTerms- Specified by:
getBucketsin classInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>- Returns:
- The buckets of this aggregation.
-
getBucketByKey
Description copied from interface:TermsGet the bucket for the given term, or null if there is no such bucket.- Specified by:
getBucketByKeyin interfaceTerms- Specified by:
getBucketByKeyin classInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
-
equals
- Overrides:
equalsin classInternalTerms<A extends InternalTerms<A,B>,B extends InternalTerms.Bucket<B>>
-
hashCode
public int hashCode()- Overrides:
hashCodein 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:
doXContentBodyin classInternalAggregation- Throws:
IOException
-