Package org.apache.lucene.search
Class FieldComparator.NumericComparator<T extends Number>
- java.lang.Object
-
- org.apache.lucene.search.FieldComparator<T>
-
- org.apache.lucene.search.FieldComparator.NumericComparator<T>
-
- Direct Known Subclasses:
FieldComparator.ByteComparator
,FieldComparator.DoubleComparator
,FieldComparator.FloatComparator
,FieldComparator.IntComparator
,FieldComparator.LongComparator
,FieldComparator.ShortComparator
- Enclosing class:
- FieldComparator<T>
public abstract static class FieldComparator.NumericComparator<T extends Number> extends FieldComparator<T>
Base FieldComparator class for numeric types
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator
FieldComparator.ByteComparator, FieldComparator.DocComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.NumericComparator<T extends Number>, FieldComparator.RelevanceComparator, FieldComparator.ShortComparator, FieldComparator.TermOrdValComparator, FieldComparator.TermValComparator
-
-
Field Summary
Fields Modifier and Type Field Description protected Bits
docsWithField
protected String
field
protected T
missingValue
-
Constructor Summary
Constructors Constructor Description NumericComparator(String field, T missingValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldComparator<T>
setNextReader(AtomicReaderContext context)
Set a newAtomicReaderContext
.-
Methods inherited from class org.apache.lucene.search.FieldComparator
compare, compareBottom, compareTop, compareValues, copy, setBottom, setScorer, setTopValue, value
-
-
-
-
Method Detail
-
setNextReader
public FieldComparator<T> setNextReader(AtomicReaderContext context) throws IOException
Description copied from class:FieldComparator
Set a newAtomicReaderContext
. All subsequent docIDs are relative to the current reader (you must add docBase if you need to map it to a top-level docID).- Specified by:
setNextReader
in classFieldComparator<T extends Number>
- Parameters:
context
- current reader context- Returns:
- the comparator to use for this segment; most comparators can just return "this" to reuse the same comparator across segments
- Throws:
IOException
- if there is a low-level IO error
-
-