Class BucketedSort.ForLongs

java.lang.Object
org.elasticsearch.search.sort.BucketedSort
org.elasticsearch.search.sort.BucketedSort.ForLongs
All Implemented Interfaces:
Closeable, AutoCloseable, Releasable
Enclosing class:
BucketedSort

public abstract static class BucketedSort.ForLongs extends BucketedSort
Superclass for implementations of BucketedSort for long keys.
  • Constructor Details

  • Method Details

    • needsScores

      public final boolean needsScores()
      Description copied from class: BucketedSort
      Does this sort need scores? Most don't, but sorting on _score does.
      Specified by:
      needsScores in class BucketedSort
    • values

      protected final BigArray values()
      Description copied from class: BucketedSort
      The BigArray backing this sort.
      Specified by:
      values in class BucketedSort
    • growValues

      protected final void growValues(long minSize)
      Description copied from class: BucketedSort
      Grow the BigArray backing this sort to account for new buckets. This will only be called if the array is too small.
      Specified by:
      growValues in class BucketedSort
    • getNextGatherOffset

      protected final int getNextGatherOffset(long rootIndex)
      Description copied from class: BucketedSort
      Get the next index that should be "gathered" for a bucket rooted at rootIndex.
      Specified by:
      getNextGatherOffset in class BucketedSort
    • setNextGatherOffset

      protected final void setNextGatherOffset(long rootIndex, int offset)
      Description copied from class: BucketedSort
      Set the next index that should be "gathered" for a bucket rooted at rootIndex.
      Specified by:
      setNextGatherOffset in class BucketedSort
    • getValue

      protected final SortValue getValue(long index)
      Description copied from class: BucketedSort
      Get the value at an index.
      Specified by:
      getValue in class BucketedSort
    • betterThan

      protected final boolean betterThan(long lhs, long rhs)
      Description copied from class: BucketedSort
      true if the entry at index lhs is "better" than the entry at rhs. "Better" in this means "lower" for SortOrder.ASC and "higher" for SortOrder.DESC.
      Specified by:
      betterThan in class BucketedSort
    • swap

      protected final void swap(long lhs, long rhs)
      Description copied from class: BucketedSort
      Swap the data at two indices.
      Specified by:
      swap in class BucketedSort