public abstract class NumericComparator.NumericLeafComparator extends Object implements LeafFieldComparator
NumericComparator
that provides skipping functionalityModifier and Type | Field and Description |
---|---|
protected NumericDocValues |
docValues |
Constructor and Description |
---|
NumericLeafComparator(LeafReaderContext context) |
Modifier and Type | Method and Description |
---|---|
DocIdSetIterator |
competitiveIterator()
Returns a competitive iterator
|
void |
copy(int slot,
int doc)
This method is called when a new hit is competitive.
|
protected abstract void |
encodeBottom(byte[] packedValue) |
protected abstract void |
encodeTop(byte[] packedValue) |
protected NumericDocValues |
getNumericDocValues(LeafReaderContext context,
String field)
Retrieves the NumericDocValues for the field in this segment
|
protected abstract boolean |
isMissingValueCompetitive() |
void |
setBottom(int slot)
Set the bottom slot, ie the "weakest" (sorted last)
entry in the queue.
|
void |
setHitsThresholdReached()
Informs this leaf comparator that hits threshold is reached.
|
void |
setScorer(Scorable scorer)
Sets the Scorer to use in case a document's score is
needed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compareBottom, compareTop
protected final NumericDocValues docValues
public NumericLeafComparator(LeafReaderContext context) throws IOException
IOException
protected NumericDocValues getNumericDocValues(LeafReaderContext context, String field) 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
slot
- the currently weakest (sorted last) slot in the queueIOException
public void copy(int slot, int doc) throws IOException
LeafFieldComparator
copy
in interface LeafFieldComparator
slot
- which slot to copy the hit todoc
- docID relative to current readerIOException
public void setScorer(Scorable scorer) throws IOException
LeafFieldComparator
setScorer
in interface LeafFieldComparator
scorer
- Scorer instance that you should use to
obtain the current hit's score, if necessary.IOException
public void setHitsThresholdReached() throws IOException
LeafFieldComparator
setHitsThresholdReached
in interface LeafFieldComparator
IOException
public DocIdSetIterator competitiveIterator()
LeafFieldComparator
competitiveIterator
in interface LeafFieldComparator
null
if such an iterator is not available for the current comparator or segment.protected abstract boolean isMissingValueCompetitive()
protected abstract void encodeBottom(byte[] packedValue)
protected abstract void encodeTop(byte[] packedValue)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.