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