public abstract class NumericComparator.NumericLeafComparator extends Object implements LeafFieldComparator
NumericComparator that provides skipping functionality| Modifier 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, waitcompareBottom, compareTopprotected final NumericDocValues docValues
public NumericLeafComparator(LeafReaderContext context) throws IOException
IOExceptionprotected NumericDocValues getNumericDocValues(LeafReaderContext context, String field) 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 LeafFieldComparatorslot - the currently weakest (sorted last) slot in the queueIOExceptionpublic void copy(int slot,
int doc)
throws IOException
LeafFieldComparatorcopy in interface LeafFieldComparatorslot - which slot to copy the hit todoc - docID relative to current readerIOExceptionpublic void setScorer(Scorable scorer) throws IOException
LeafFieldComparatorsetScorer in interface LeafFieldComparatorscorer - Scorer instance that you should use to
obtain the current hit's score, if necessary.IOExceptionpublic void setHitsThresholdReached()
throws IOException
LeafFieldComparatorsetHitsThresholdReached in interface LeafFieldComparatorIOExceptionpublic DocIdSetIterator competitiveIterator()
LeafFieldComparatorcompetitiveIterator in interface LeafFieldComparatornull 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.