public abstract class SimpleFieldComparator<T> extends FieldComparator<T> implements LeafFieldComparator
FieldComparator implementation that is used for all contexts.FieldComparator.DocComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.NumericComparator<T extends Number>, 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(Scorer scorer)
Sets the Scorer to use in case a document's score is
needed.
|
compare, compareValues, setTopValue, valueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompareBottom, compareTop, copy, setBottomprotected abstract void doSetNextReader(LeafReaderContext context) throws IOException
context.IOExceptionpublic final LeafFieldComparator getLeafComparator(LeafReaderContext context) throws IOException
FieldComparatorLeafFieldComparator 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 contextIOException - if there is a low-level IO errorpublic void setScorer(Scorer scorer) throws IOException
LeafFieldComparatorsetScorer in interface LeafFieldComparatorscorer - Scorer instance that you should use to
obtain the current hit's score, if necessary.IOExceptionCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.