public class LongComparator.LongLeafComparator extends NumericComparator.NumericLeafComparator
LongComparator
that provides skipping functionalitydocValues
Constructor and Description |
---|
LongLeafComparator(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, setHitsThresholdReached, setScorer
public LongLeafComparator(LeafReaderContext context) throws IOException
IOException
public void setBottom(int slot) throws IOException
LeafFieldComparator
LeafFieldComparator.compareBottom(int)
is
called, you should compare against this slot. This
will always be called before LeafFieldComparator.compareBottom(int)
.setBottom
in interface LeafFieldComparator
setBottom
in class NumericComparator.NumericLeafComparator
slot
- the currently weakest (sorted last) slot in the queueIOException
public int compareBottom(int doc) throws IOException
LeafFieldComparator
FieldComparator.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.IOException
public int compareTop(int doc) throws IOException
LeafFieldComparator
FieldComparator.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.IOException
public void copy(int slot, int doc) throws IOException
LeafFieldComparator
copy
in interface LeafFieldComparator
copy
in class NumericComparator.NumericLeafComparator
slot
- which slot to copy the hit todoc
- docID relative to current readerIOException
protected boolean isMissingValueCompetitive()
isMissingValueCompetitive
in class NumericComparator.NumericLeafComparator
protected void encodeBottom(byte[] packedValue)
encodeBottom
in class NumericComparator.NumericLeafComparator
protected void encodeTop(byte[] packedValue)
encodeTop
in class NumericComparator.NumericLeafComparator
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.