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.SimpleFieldComparator<T>
-
- org.apache.lucene.search.FieldComparator.NumericComparator<T>
-
- All Implemented Interfaces:
LeafFieldComparator
- Direct Known Subclasses:
FieldComparator.DoubleComparator
,FieldComparator.FloatComparator
,FieldComparator.IntComparator
,FieldComparator.LongComparator
- Enclosing class:
- FieldComparator<T>
public abstract static class FieldComparator.NumericComparator<T extends java.lang.Number> extends SimpleFieldComparator<T>
Base FieldComparator class for numeric types
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator
FieldComparator.DocComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.NumericComparator<T extends java.lang.Number>, FieldComparator.RelevanceComparator, FieldComparator.TermOrdValComparator, FieldComparator.TermValComparator
-
-
Field Summary
Fields Modifier and Type Field Description protected NumericDocValues
currentReaderValues
protected java.lang.String
field
protected T
missingValue
-
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 protected void
doSetNextReader(LeafReaderContext context)
This method is called before collectingcontext
.protected NumericDocValues
getNumericDocValues(LeafReaderContext context, java.lang.String field)
Retrieves the NumericDocValues for the field in this segment-
Methods inherited from class org.apache.lucene.search.SimpleFieldComparator
getLeafComparator, setScorer
-
Methods inherited from class org.apache.lucene.search.FieldComparator
compare, compareValues, setTopValue, value
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.search.LeafFieldComparator
compareBottom, compareTop, copy, setBottom
-
-
-
-
Field Detail
-
missingValue
protected final T extends java.lang.Number missingValue
-
field
protected final java.lang.String field
-
currentReaderValues
protected NumericDocValues currentReaderValues
-
-
Constructor Detail
-
NumericComparator
public NumericComparator(java.lang.String field, T missingValue)
-
-
Method Detail
-
doSetNextReader
protected void doSetNextReader(LeafReaderContext context) throws java.io.IOException
Description copied from class:SimpleFieldComparator
This method is called before collectingcontext
.- Specified by:
doSetNextReader
in classSimpleFieldComparator<T extends java.lang.Number>
- Throws:
java.io.IOException
-
getNumericDocValues
protected NumericDocValues getNumericDocValues(LeafReaderContext context, java.lang.String field) throws java.io.IOException
Retrieves the NumericDocValues for the field in this segment- Throws:
java.io.IOException
-
-