Package org.elasticsearch.search.sort
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
docBetterThan(long index)
true
if the sort value for the doc is "better" than the entry atindex
.protected abstract double
docValue()
Return the value for of this sort for the document to which we justmoved
.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
-
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 justmoved
. This should be fast because it is called twice per competitive hit when in heap mode, once fordocBetterThan(long)
and once forsetIndexToDocValue(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 classBucketedSort.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 atindex
. "Better" in means is "lower" forSortOrder.ASC
and "higher" forSortOrder.DESC
.- Specified by:
docBetterThan
in classBucketedSort.Leaf
-