All Implemented Interfaces:
NamedWriteable, Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment, Aggregation, MultiBucketsAggregation, Terms

public class DoubleTerms
extends InternalMappedTerms<DoubleTerms,​org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms.Bucket>
Result of the TermsAggregator when the field is some kind of decimal number like a float, double, or distance.
  • Field Details

  • Constructor Details

    • DoubleTerms

      public DoubleTerms​(java.lang.String name, BucketOrder reduceOrder, BucketOrder order, int requiredSize, long minDocCount, java.util.Map<java.lang.String,​java.lang.Object> metadata, DocValueFormat format, int shardSize, boolean showTermDocCountError, long otherDocCount, java.util.List<org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms.Bucket> buckets, long docCountError)
    • DoubleTerms

      public DoubleTerms​(StreamInput in) throws java.io.IOException
      Read from a stream.
      Throws:
      java.io.IOException
  • Method Details

    • getWriteableName

      public java.lang.String getWriteableName()
      Description copied from interface: NamedWriteable
      Returns the name of the writeable object
    • create

      public DoubleTerms create​(java.util.List<org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms.Bucket> buckets)
      Description copied from class: InternalMultiBucketAggregation
      Create a new copy of this Aggregation with the same settings as this Aggregation and contains the provided buckets.
      Specified by:
      create in class InternalMultiBucketAggregation<DoubleTerms,​org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms.Bucket>
      Parameters:
      buckets - the buckets to use in the new Aggregation
      Returns:
      the new Aggregation
    • createBucket

      public org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms.Bucket createBucket​(InternalAggregations aggregations, org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms.Bucket prototype)
      Description copied from class: InternalMultiBucketAggregation
      Create a new InternalMultiBucketAggregation.InternalBucket using the provided prototype bucket and aggregations.
      Specified by:
      createBucket in class InternalMultiBucketAggregation<DoubleTerms,​org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms.Bucket>
      Parameters:
      aggregations - the aggregations for the new bucket
      prototype - the bucket to use as a prototype
      Returns:
      the new bucket
    • create

      protected DoubleTerms create​(java.lang.String name, java.util.List<org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms.Bucket> buckets, BucketOrder reduceOrder, long docCountError, long otherDocCount)
      Description copied from class: AbstractInternalTerms
      Creates InternalTerms at the end of the merge
      Specified by:
      create in class InternalTerms<DoubleTerms,​org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms.Bucket>
    • createBucketsArray

      protected org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms.Bucket[] createBucketsArray​(int size)
      Description copied from class: AbstractInternalTerms
      Create an array to hold some buckets. Used in collecting the results.
      Specified by:
      createBucketsArray in class AbstractInternalTerms<DoubleTerms,​org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms.Bucket>
    • reduce

      public InternalAggregation reduce​(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
      Description copied from class: InternalAggregation
      Reduces 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:
      reduce in class AbstractInternalTerms<DoubleTerms,​org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms.Bucket>
      See Also:
      InternalAggregation.mustReduceOnSingleInternalAgg()
    • createBucket

      protected org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms.Bucket createBucket​(long docCount, InternalAggregations aggs, long docCountError, org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms.Bucket prototype)
      Specified by:
      createBucket in class AbstractInternalTerms<DoubleTerms,​org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms.Bucket>