Class BytesKeyedBucketOrds

org.elasticsearch.search.aggregations.bucket.terms.BytesKeyedBucketOrds
All Implemented Interfaces:
, , org.elasticsearch.core.Releasable

public abstract class BytesKeyedBucketOrds extends implements org.elasticsearch.core.Releasable
Maps BytesRef bucket keys to bucket ordinals.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    An iterator for buckets inside a particular owningBucketOrd.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract long
    add​(long owningBucketOrd, org.apache.lucene.util.BytesRef value)
    Add the owningBucketOrd, value pair.
    abstract long
    bucketsInOrd​(long owningBucketOrd)
    Count the buckets in owningBucketOrd.
    build​(BigArrays bigArrays, CardinalityUpperBound cardinality)
    ordsEnum​(long owningBucketOrd)
    Build an iterator for buckets inside owningBucketOrd in order of increasing ord.
    abstract long
    The number of collected buckets.

    Methods inherited from class java.lang.

    , , , , , , , , , ,

    Methods inherited from interface org.elasticsearch.core.Releasable

    close
  • Method Details

    • build

      public static BytesKeyedBucketOrds build(BigArrays bigArrays, CardinalityUpperBound cardinality)
    • add

      public abstract long add(long owningBucketOrd, org.apache.lucene.util.BytesRef value)
      Add the owningBucketOrd, value pair. Return the ord for their bucket if they have yet to be added, or -1-ord if they were already present.
    • bucketsInOrd

      public abstract long bucketsInOrd(long owningBucketOrd)
      Count the buckets in owningBucketOrd.
    • size

      public abstract long size()
      The number of collected buckets.
    • ordsEnum

      public abstract BytesKeyedBucketOrds.BucketOrdsEnum ordsEnum(long owningBucketOrd)
      Build an iterator for buckets inside owningBucketOrd in order of increasing ord.

      When this is first returns it is "unpositioned" and you must call BytesKeyedBucketOrds.BucketOrdsEnum.next() to move it to the first value.