Class BucketedSort.ForDoubles.Leaf

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

protected abstract class BucketedSort.ForDoubles.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 boolean
    docBetterThan(long index)
    true if the sort value for the doc is "better" than the entry at index.
    protected abstract double
    Return the value for of this sort for the document to which we just moved.
    protected void
    setIndexToDocValue(long index)
    Set the value at the index to the value of the document to which we just advanced.
    void
    setScorer(org.apache.lucene.search.Scorable scorer)
     

    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
  • Constructor Details

    • Leaf

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

    • docValue

      protected abstract double 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).
    • setScorer

      public final void setScorer(org.apache.lucene.search.Scorable scorer)
    • 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