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(Scorable scorer)
Sets the Scorer to use in case a document's score is
needed.
|
compare, compareValues, setTopValue, value
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compareBottom, compareTop, copy, setBottom
protected abstract void doSetNextReader(LeafReaderContext context) throws IOException
context
.IOException
public final LeafFieldComparator getLeafComparator(LeafReaderContext context) throws IOException
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 contextIOException
- if there is a low-level IO errorpublic 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
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.