Class BucketedSort.ForFloats.Leaf

java.lang.Object
org.elasticsearch.search.sort.BucketedSort.Leaf
org.elasticsearch.search.sort.BucketedSort.ForFloats.Leaf
All Implemented Interfaces:
ScorerAware
Enclosing class:
BucketedSort.ForFloats

protected abstract class BucketedSort.ForFloats.Leaf extends BucketedSort.Leaf
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Leaf(org.apache.lucene.index.LeafReaderContext ctx)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final boolean
    docBetterThan(long index)
    true if the sort value for the doc is "better" than the entry at index.
    protected abstract float
    Return the value for of this sort for the document to which we just moved.
    protected final void
    setIndexToDocValue(long index)
    Set the value at the index to the value of the document to which we just advanced.

    Methods inherited from class org.elasticsearch.search.sort.BucketedSort.Leaf

    advanceExact, collect

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.elasticsearch.common.lucene.ScorerAware

    setScorer
  • Constructor Details

    • Leaf

      protected Leaf(org.apache.lucene.index.LeafReaderContext ctx)
  • Method Details

    • docValue

      protected abstract float docValue()
      Return the value for of this sort for the document to which we just moved. This should be fast because it is called twice per competitive hit when in heap mode, once for docBetterThan(long) and once for setIndexToDocValue(long).
    • setIndexToDocValue

      protected final void setIndexToDocValue(long index)
      Description copied from class: BucketedSort.Leaf
      Set the value at the index to the value of the document to which we just advanced.
      Specified by:
      setIndexToDocValue in class BucketedSort.Leaf
    • docBetterThan

      protected final boolean docBetterThan(long index)
      Description copied from class: BucketedSort.Leaf
      true if the sort value for the doc is "better" than the entry at index. "Better" in means is "lower" for SortOrder.ASC and "higher" for SortOrder.DESC.
      Specified by:
      docBetterThan in class BucketedSort.Leaf