Module org.elasticsearch.server
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,Aggregation,MultiBucketsAggregation,Terms,ToXContent,ToXContentFragment
- 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<B extends AbstractInternalTerms.AbstractTermsBucket<B>>Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation
InternalMultiBucketAggregation.BucketAggregationList<B extends MultiBucketsAggregation.Bucket>, InternalMultiBucketAggregation.InternalBucket, InternalMultiBucketAggregation.InternalBucketWritableNested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
Aggregation.CommonFieldsNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, 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 final DocValueFormatprotected final longprotected final intprotected final 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.InternalMultiBucketAggregation
REPORT_EMPTY_EVERYFields 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.xcontent.ToXContent
EMPTY, 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 TypeMethodDescriptionfinal XContentBuilderdoXContentBody(XContentBuilder builder, 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.Get an upper bound of the error on document counts in this aggregation.protected intprotected booleanlongReturn the sum of the document counts of all buckets that did not make it to the top buckets.inthashCode()protected voidsetDocCountError(long docCountError) protected final 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, finalizeSampling, termsAggregationReducerMethods 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
canLeadReduction, getLeaderReducer, getMetadata, getName, getProperty, getReducer, getType, 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.xcontent.ToXContent
toXContentMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
format
-
shardSize
protected final int shardSize -
showTermDocCountError
protected final boolean showTermDocCountError -
otherDocCount
protected final long otherDocCount -
buckets
-
bucketMap
-
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 IOException Read 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>>
-
getShowDocCountError
protected boolean getShowDocCountError()- Specified by:
getShowDocCountErrorin classAbstractInternalTerms<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
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 XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
doXContentBodyin classInternalAggregation- Throws:
IOException
-