Package org.apache.lucene.search
Class DoubleValuesSource.DoubleValuesSortField
java.lang.Object
org.apache.lucene.search.SortField
org.apache.lucene.search.DoubleValuesSource.DoubleValuesSortField
- Enclosing class:
- DoubleValuesSource
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.SortField
SortField.Provider, SortField.Type
-
Field Summary
FieldsFields inherited from class org.apache.lucene.search.SortField
FIELD_DOC, FIELD_SCORE, missingValue, reverse, STRING_FIRST, STRING_LAST
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether the relevance score is needed to sort documents.rewrite
(IndexSearcher searcher) Rewrites this SortField, returning a new SortField if a change is made.void
setMissingValue
(Object missingValue) Set the value to use for documents that don't have a value.toString()
Methods inherited from class org.apache.lucene.search.SortField
equals, getBytesComparator, getComparator, getComparatorSource, getField, getIndexSorter, getMissingValue, getOptimizeSortWithIndexedData, getOptimizeSortWithPoints, getReverse, getType, hashCode, readType, setBytesComparator, setOptimizeSortWithIndexedData, setOptimizeSortWithPoints
-
Field Details
-
producer
-
-
Constructor Details
-
DoubleValuesSortField
DoubleValuesSortField(DoubleValuesSource producer, boolean reverse)
-
-
Method Details
-
setMissingValue
Description copied from class:SortField
Set the value to use for documents that don't have a value.- Overrides:
setMissingValue
in classSortField
-
needsScores
public boolean needsScores()Description copied from class:SortField
Whether the relevance score is needed to sort documents.- Overrides:
needsScores
in classSortField
-
toString
-
rewrite
Description copied from class:SortField
Rewrites this SortField, returning a new SortField if a change is made. Subclasses should override this define their rewriting behavior when this SortField is of typeSortField.Type.REWRITEABLE
- Overrides:
rewrite
in classSortField
- Parameters:
searcher
- IndexSearcher to use during rewriting- Returns:
- New rewritten SortField, or
this
if nothing has changed. - Throws:
IOException
- Can be thrown by the rewriting
-