Class InternalRange.Bucket

org.elasticsearch.search.aggregations.InternalMultiBucketAggregation.InternalBucket
org.elasticsearch.search.aggregations.bucket.range.InternalRange.Bucket
All Implemented Interfaces:
Writeable, org.elasticsearch.common.xcontent.ToXContent, MultiBucketsAggregation.Bucket, Range.Bucket, HasAggregations
Direct Known Subclasses:
InternalDateRange.Bucket
Enclosing class:
InternalRange<B extends InternalRange.Bucket,​R extends InternalRange<B,​R>>

public static class InternalRange.Bucket extends InternalMultiBucketAggregation.InternalBucket implements Range.Bucket
  • Field Details

    • keyed

      protected final transient boolean keyed
    • format

      protected final transient DocValueFormat format
    • from

      protected final double from
    • to

      protected final double to
  • Constructor Details

  • Method Details

    • getKey

      public  getKey()
      Specified by:
      getKey in interface MultiBucketsAggregation.Bucket
      Returns:
      The key associated with the bucket
    • getKeyAsString

      public  getKeyAsString()
      Specified by:
      getKeyAsString in interface MultiBucketsAggregation.Bucket
      Returns:
      The key associated with the bucket as a string
    • getFrom

      public  getFrom()
      Specified by:
      getFrom in interface Range.Bucket
      Returns:
      The lower bound of the range
    • getTo

      public  getTo()
      Specified by:
      getTo in interface Range.Bucket
      Returns:
      The upper bound of the range (excluding)
    • getKeyed

      public boolean getKeyed()
    • getFormat

      public DocValueFormat getFormat()
    • getFromAsString

      public  getFromAsString()
      Specified by:
      getFromAsString in interface Range.Bucket
      Returns:
      The string value for the lower bound of the range
    • getToAsString

      public  getToAsString()
      Specified by:
      getToAsString in interface Range.Bucket
      Returns:
      The string value for the upper bound of the range (excluding)
    • getDocCount

      public long getDocCount()
      Specified by:
      getDocCount in interface MultiBucketsAggregation.Bucket
      Returns:
      The number of documents that fall within this bucket
    • getAggregations

      public InternalAggregations getAggregations()
      Specified by:
      getAggregations in interface HasAggregations
      Specified by:
      getAggregations in interface MultiBucketsAggregation.Bucket
      Returns:
      The sub-aggregations of this bucket
    • getFactory

      protected InternalRange.Factory<? extends InternalRange.Bucket,​?> getFactory()
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
    • writeTo

      public void writeTo(StreamOutput out) throws
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
    • equals

      public boolean equals( other)
      Overrides:
       in class 
    • hashCode

      public int hashCode()
      Overrides:
       in class