The SortField type exposes the following members.

Fields

  NameDescription
Public fieldStatic memberAUTO Obsolete.
Guess type of sort based on field contents. A regular expression is used to look at the first term indexed for the field and determine if it represents an integer number, a floating point number, or just arbitrary string characters.
Public fieldStatic memberBYTE
Sort using term values as encoded Bytes. Sort values are Byte and lower values are at the front.
Public fieldStatic memberCUSTOM
Sort using a custom Comparator. Sort values are any Comparable and sorting is done according to natural order.
Public fieldStatic memberDOC
Sort by document number (index order). Sort values are Integer and lower values are at the front.
Public fieldStatic memberDOUBLE
Sort using term values as encoded Doubles. Sort values are Double and lower values are at the front.
Public fieldStatic memberFIELD_DOC
Represents sorting by document number (index order).
Public fieldStatic memberFIELD_SCORE
Represents sorting by document score (relevancy).
Public fieldStatic memberFLOAT
Sort using term values as encoded Floats. Sort values are Float and lower values are at the front.
Public fieldStatic memberINT
Sort using term values as encoded Integers. Sort values are Integer and lower values are at the front.
Public fieldStatic memberLONG
Sort using term values as encoded Longs. Sort values are Long and lower values are at the front.
Public fieldStatic memberSCORE
Sort by document score (relevancy). Sort values are Float and higher values are at the front.
Public fieldStatic memberSHORT
Sort using term values as encoded Shorts. Sort values are Short and lower values are at the front.
Public fieldStatic memberSTRING
Sort using term values as Strings. Sort values are String and lower values are at the front.
Public fieldStatic memberSTRING_VAL
Sort using term values as Strings, but comparing by value (using String.compareTo) for all comparisons. This is typically slower than {@link #STRING}, which uses ordinals to do the sorting.

See Also