Package org.apache.lucene.search
Class FieldComparator.NumericComparator<T extends java.lang.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 java.lang.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 java.lang.Number>, FieldComparator.RelevanceComparator, FieldComparator.ShortComparator, FieldComparator.TermOrdValComparator, FieldComparator.TermValComparator
-
-
Constructor Summary
Constructors Constructor Description NumericComparator(java.lang.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
-
-
-
-
Constructor Detail
-
NumericComparator
public NumericComparator(java.lang.String field, T missingValue)
-
-
Method Detail
-
setNextReader
public FieldComparator<T> setNextReader(AtomicReaderContext context) throws java.io.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 java.lang.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:
java.io.IOException
- if there is a low-level IO error
-
-