public class Sorting extends Object
| Constructor and Description |
|---|
Sorting() |
| Modifier and Type | Method and Description |
|---|---|
static SortField |
getStringSortField(String fieldName,
boolean reverse,
boolean nullLast,
boolean nullFirst)
Returns a
SortField for a string field. |
public static SortField getStringSortField(String fieldName, boolean reverse, boolean nullLast, boolean nullFirst)
SortField 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.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 orderCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.