Package org.apache.solr.search
Class Sorting
- java.lang.Object
-
- org.apache.solr.search.Sorting
-
@Deprecated public class Sorting extends Object
Deprecated.customFieldType
s should use the helper methods in the base class. Other usage should leverage th underling luceneSortField
classes directly.Extra lucene sorting utilities & convenience methods
-
-
Constructor Summary
Constructors Constructor Description Sorting()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static org.apache.lucene.search.SortField
getStringSortField(String fieldName, boolean reverse, boolean nullLast, boolean nullFirst)
Deprecated.customFieldType
s should useFieldType.getSortField(org.apache.solr.schema.SchemaField, boolean)
.static org.apache.lucene.search.SortField
getTextSortField(String fieldName, boolean reverse, boolean nullLast, boolean nullFirst)
-
-
-
Method Detail
-
getStringSortField
@Deprecated public static org.apache.lucene.search.SortField getStringSortField(String fieldName, boolean reverse, boolean nullLast, boolean nullFirst)
Deprecated.customFieldType
s should useFieldType.getSortField(org.apache.solr.schema.SchemaField, boolean)
. Other usage should leverage th underling luceneSortField
classes directly.Returns aSortField
for a string field. If nullLast and nullFirst are both false, then default lucene string sorting is used where null strings sort first in an ascending sort, and last in a descending sort.- Parameters:
fieldName
- the name of the field to sort onreverse
- true for a reverse (desc) sortnullLast
- true if null should come last, regardless of sort ordernullFirst
- true if null should come first, regardless of sort order- Returns:
- SortField
-
getTextSortField
@Deprecated public static org.apache.lucene.search.SortField getTextSortField(String fieldName, boolean reverse, boolean nullLast, boolean nullFirst)
Deprecated.customFieldType
s should useFieldType.getSortedSetSortField(org.apache.solr.schema.SchemaField, org.apache.lucene.search.SortedSetSelector.Type, boolean, java.lang.Object, java.lang.Object)
. Other usage should leverage th underling luceneSortedSetSortField
classes directly.LikegetStringSortField(java.lang.String, boolean, boolean, boolean)
) except safe for tokenized fields
-
-