SortField
Creates a sort by terms in the given field with the type of term values explicitly given.
Parameters
field
Name of field to sort by. Can be null if type is SCORE or DOC.
type
Type of values in the terms.
Creates a sort, possibly in reverse, by terms in the given field with the type of term values explicitly given.
Parameters
field
Name of field to sort by. Can be null if type is SCORE or DOC.
type
Type of values in the terms.
reverse
True if natural order should be reversed.
Creates a sort with a custom comparison function.
Parameters
field
Name of field to sort by; cannot be null.
comparator
Returns a comparator for sorting hits.
Creates a sort, possibly in reverse, with a custom comparison function.
Parameters
field
Name of field to sort by; cannot be null.
comparator
Returns a comparator for sorting hits.
reverse
True if natural order should be reversed.