public class DoubleComparator.DoubleLeafComparator extends NumericComparator.NumericLeafComparator
DoubleComparator that provides skipping functionalitydocValues| Constructor and Description |
|---|
DoubleLeafComparator(LeafReaderContext context) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareBottom(int doc)
Compare the bottom of the queue with this doc.
|
int |
compareTop(int doc)
Compare the top value with this doc.
|
void |
copy(int slot,
int doc)
This method is called when a new hit is competitive.
|
protected void |
encodeBottom(byte[] packedValue) |
protected void |
encodeTop(byte[] packedValue) |
protected boolean |
isMissingValueCompetitive() |
void |
setBottom(int slot)
Set the bottom slot, ie the "weakest" (sorted last)
entry in the queue.
|
competitiveIterator, getNumericDocValues, getPointValues, setHitsThresholdReached, setScorerpublic DoubleLeafComparator(LeafReaderContext context) throws IOException
IOExceptionpublic void setBottom(int slot)
throws IOException
LeafFieldComparatorLeafFieldComparator.compareBottom(int) is
called, you should compare against this slot. This
will always be called before LeafFieldComparator.compareBottom(int).setBottom in interface LeafFieldComparatorsetBottom in class NumericComparator.NumericLeafComparatorslot - the currently weakest (sorted last) slot in the queueIOExceptionpublic int compareBottom(int doc)
throws IOException
LeafFieldComparatorFieldComparator.compare(int,int)} as if bottom were slot1 and the new
document were slot 2.
For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).
doc - that was hitN < 0 if the doc's value is sorted after
the bottom entry (not competitive), any N > 0 if the
doc's value is sorted before the bottom entry and 0 if
they are equal.IOExceptionpublic int compareTop(int doc)
throws IOException
LeafFieldComparatorFieldComparator.compare(int,int)} as if topValue were slot1 and the new
document were slot 2. This is only called for searches that
use searchAfter (deep paging).doc - that was hitN < 0 if the doc's value is sorted after
the top entry (not competitive), any N > 0 if the
doc's value is sorted before the top entry and 0 if
they are equal.IOExceptionpublic void copy(int slot,
int doc)
throws IOException
LeafFieldComparatorcopy in interface LeafFieldComparatorcopy in class NumericComparator.NumericLeafComparatorslot - which slot to copy the hit todoc - docID relative to current readerIOExceptionprotected boolean isMissingValueCompetitive()
isMissingValueCompetitive in class NumericComparator.NumericLeafComparatorprotected void encodeBottom(byte[] packedValue)
encodeBottom in class NumericComparator.NumericLeafComparatorprotected void encodeTop(byte[] packedValue)
encodeTop in class NumericComparator.NumericLeafComparatorCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.