Module org.elasticsearch.server
Class LongTerms
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<LongTerms,LongTerms.Bucket>
 
org.elasticsearch.search.aggregations.bucket.terms.LongTerms
- All Implemented Interfaces:
- NamedWriteable,- Writeable,- Aggregation,- MultiBucketsAggregation,- Terms,- ToXContent,- ToXContentFragment
Result of the 
TermsAggregator when the field is some kind of whole number like a integer, long, or a date.- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class org.elasticsearch.search.aggregations.bucket.terms.AbstractInternalTermsAbstractInternalTerms.AbstractTermsBucketNested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregationInternalMultiBucketAggregation.InternalBucketNested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.AggregationAggregation.CommonFieldsNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContentToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.WriteableWriteable.Reader<V>, Writeable.Writer<V>
- 
Field SummaryFieldsFields inherited from class org.elasticsearch.search.aggregations.bucket.terms.InternalMappedTermsbucketMap, buckets, docCountError, format, otherDocCount, shardSize, showTermDocCountErrorFields inherited from class org.elasticsearch.search.aggregations.bucket.terms.InternalTermsDOC_COUNT_ERROR_UPPER_BOUND_FIELD_NAME, minDocCount, order, reduceOrder, requiredSize, SUM_OF_OTHER_DOC_COUNTSFields inherited from class org.elasticsearch.search.aggregations.InternalAggregationmetadata, nameFields inherited from interface org.elasticsearch.search.aggregations.AggregationTYPED_KEYS_DELIMITERFields inherited from interface org.elasticsearch.xcontent.ToXContentEMPTY_PARAMS
- 
Constructor SummaryConstructorsConstructorDescriptionLongTerms(String name, BucketOrder reduceOrder, BucketOrder order, int requiredSize, long minDocCount, Map<String, Object> metadata, DocValueFormat format, int shardSize, boolean showTermDocCountError, long otherDocCount, List<LongTerms.Bucket> buckets, Long docCountError) LongTerms(StreamInput in) Read from a stream.
- 
Method SummaryModifier and TypeMethodDescriptionprotected LongTermscreate(String name, List<LongTerms.Bucket> buckets, BucketOrder reduceOrder, long docCountError, long otherDocCount) Creates InternalTerms at the end of the mergecreate(List<LongTerms.Bucket> buckets) Create a new copy of thisAggregationwith the same settings as thisAggregationand contains the provided buckets.protected LongTerms.BucketcreateBucket(long docCount, InternalAggregations aggs, long docCountError, LongTerms.Bucket prototype) createBucket(InternalAggregations aggregations, LongTerms.Bucket prototype) Create a newInternalMultiBucketAggregation.InternalBucketusing the provided prototype bucket and aggregations.Returns the name of the writeable objectreduce(List<InternalAggregation> aggregations, AggregationReduceContext reduceContext) Reduces the given aggregations to a single one and returns it.Methods inherited from class org.elasticsearch.search.aggregations.bucket.terms.InternalMappedTermsdoXContentBody, equals, getBucketByKey, getBuckets, getDocCountError, getShardSize, getSumOfOtherDocCounts, hashCode, setDocCountError, writeTermTypeInfoToMethods inherited from class org.elasticsearch.search.aggregations.bucket.terms.InternalTermsdoWriteTo, getMinDocCount, getOrder, getReduceOrder, getRequiredSizeMethods inherited from class org.elasticsearch.search.aggregations.bucket.terms.AbstractInternalTermsdoXContentCommon, finalizeSampling, reduceBucketMethods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregationcopyWithRewritenBuckets, countInnerBucket, countInnerBucket, forEachBucket, getProperty, mustReduceOnSingleInternalAgg, reducePipelinesMethods inherited from class org.elasticsearch.search.aggregations.InternalAggregationgetMetadata, getName, getProperty, getType, isMapped, readSize, sortValue, sortValue, toString, toXContent, writeSize, writeToMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.AggregationgetMetadata, getName, getTypeMethods inherited from interface org.elasticsearch.xcontent.ToXContenttoXContentMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragmentisFragment
- 
Field Details- 
NAME- See Also:
 
 
- 
- 
Constructor Details- 
LongTermspublic LongTerms(String name, BucketOrder reduceOrder, BucketOrder order, int requiredSize, long minDocCount, Map<String, Object> metadata, DocValueFormat format, int shardSize, boolean showTermDocCountError, long otherDocCount, List<LongTerms.Bucket> buckets, Long docCountError) 
- 
LongTermsRead from a stream.- Throws:
- IOException
 
 
- 
- 
Method Details- 
getWriteableNameDescription copied from interface:NamedWriteableReturns the name of the writeable object
- 
createDescription copied from class:InternalMultiBucketAggregationCreate a new copy of thisAggregationwith the same settings as thisAggregationand contains the provided buckets.- Specified by:
- createin class- InternalMultiBucketAggregation<LongTerms,- LongTerms.Bucket> 
- Parameters:
- buckets- the buckets to use in the new- Aggregation
- Returns:
- the new Aggregation
 
- 
createBucketDescription copied from class:InternalMultiBucketAggregationCreate a newInternalMultiBucketAggregation.InternalBucketusing the provided prototype bucket and aggregations.- Specified by:
- createBucketin class- InternalMultiBucketAggregation<LongTerms,- LongTerms.Bucket> 
- Parameters:
- aggregations- the aggregations for the new bucket
- prototype- the bucket to use as a prototype
- Returns:
- the new bucket
 
- 
createprotected LongTerms create(String name, List<LongTerms.Bucket> buckets, BucketOrder reduceOrder, long docCountError, long otherDocCount) Description copied from class:AbstractInternalTermsCreates InternalTerms at the end of the merge- Specified by:
- createin class- InternalTerms<LongTerms,- LongTerms.Bucket> 
 
- 
reducepublic InternalAggregation reduce(List<InternalAggregation> aggregations, AggregationReduceContext reduceContext) Description copied from class:InternalAggregationReduces the given aggregations to a single one and returns it. In most cases, the assumption will be the all given aggregations are of the same type (the same type as this aggregation). For best efficiency, when implementing, try reusing an existing instance (typically the first in the given list) to save on redundant object construction.- Overrides:
- reducein class- AbstractInternalTerms<LongTerms,- LongTerms.Bucket> 
- See Also:
 
- 
createBucketprotected LongTerms.Bucket createBucket(long docCount, InternalAggregations aggs, long docCountError, LongTerms.Bucket prototype) - Specified by:
- createBucketin class- AbstractInternalTerms<LongTerms,- LongTerms.Bucket> 
 
 
-