public abstract class SimpleFieldComparator<T> extends FieldComparator<T> implements LeafFieldComparator
FieldComparator
implementation that is used for all contexts.FieldComparator.RelevanceComparator, FieldComparator.TermOrdValComparator, FieldComparator.TermValComparator
Constructor and Description |
---|
SimpleFieldComparator() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doSetNextReader(LeafReaderContext context)
This method is called before collecting
context . |
LeafFieldComparator |
getLeafComparator(LeafReaderContext context)
Get a per-segment
LeafFieldComparator to collect the given
LeafReaderContext . |
void |
setScorer(Scorable scorer)
Sets the Scorer to use in case a document's score is
needed.
|
compare, compareValues, disableSkipping, setSingleSort, setTopValue, value
compareBottom, compareTop, competitiveIterator, copy, setBottom, setHitsThresholdReached
protected abstract void doSetNextReader(LeafReaderContext context) throws
context
.
public final LeafFieldComparator getLeafComparator(LeafReaderContext context) throws
FieldComparator
LeafFieldComparator
to collect the given
LeafReaderContext
. All docIDs supplied to
this LeafFieldComparator
are relative to the current reader (you
must add docBase if you need to map it to a top-level docID).getLeafComparator
in class FieldComparator<T>
context
- current reader context
- if there is a low-level IO errorpublic void setScorer(Scorable scorer) throws
LeafFieldComparator
setScorer
in interface LeafFieldComparator
scorer
- Scorer instance that you should use to
obtain the current hit's score, if necessary.
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.