Module org.apache.lucene.core
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 TypeMethodDescriptionbooleanWhether the relevance score is needed to sort documents.rewrite(IndexSearcher searcher) Rewrites this SortField, returning a new SortField if a change is made.voidsetMissingValue(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:SortFieldSet the value to use for documents that don't have a value.- Overrides:
setMissingValuein classSortField
-
needsScores
public boolean needsScores()Description copied from class:SortFieldWhether the relevance score is needed to sort documents.- Overrides:
needsScoresin classSortField
-
toString
-
rewrite
Description copied from class:SortFieldRewrites 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:
rewritein classSortField- Parameters:
searcher- IndexSearcher to use during rewriting- Returns:
- New rewritten SortField, or
thisif nothing has changed. - Throws:
IOException- Can be thrown by the rewriting
-