The SortField type exposes the following members.
Constructors
Name | Description | |
---|---|---|
SortField(String) | Obsolete. Creates a sort by terms in the given field where the type of term value
is determined dynamically ({@link #AUTO AUTO}).
| |
SortField(String, FieldComparatorSource) | Creates a sort with a custom comparison function. | |
SortField(String, Parser) | Creates a sort by terms in the given field, parsed
to numeric values using a custom {@link FieldCache.Parser}.
| |
SortField(String, SortComparatorSource) | Obsolete. Creates a sort with a custom comparison function. | |
SortField(String, Boolean) | Obsolete. Creates a sort, possibly in reverse, by terms in the given field where
the type of term value is determined dynamically ({@link #AUTO AUTO}).
| |
SortField(String, CultureInfo) | Creates a sort by terms in the given field sorted
according to the given locale.
| |
SortField(String, Int32) | Creates a sort by terms in the given field with the type of term
values explicitly given.
| |
SortField(String, FieldComparatorSource, Boolean) | Creates a sort, possibly in reverse, with a custom comparison function. | |
SortField(String, Parser, Boolean) | Creates a sort, possibly in reverse, by terms in the given field, parsed
to numeric values using a custom {@link FieldCache.Parser}.
| |
SortField(String, SortComparatorSource, Boolean) | Obsolete. Creates a sort, possibly in reverse, with a custom comparison function. | |
SortField(String, CultureInfo, Boolean) | Creates a sort, possibly in reverse, by terms in the given field sorted
according to the given locale.
| |
SortField(String, Int32, Boolean) | Creates a sort, possibly in reverse, by terms in the given field with the
type of term values explicitly given.
|
Methods
Name | Description | |
---|---|---|
Equals | Returns true if (Overrides Object..::..Equals(Object).)CopyC# o | |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetComparator | Returns the {@link FieldComparator} to use for
sorting.
NOTE: This API is experimental and might change in
incompatible ways in the next release.
| |
GetComparatorSource | ||
GetFactory | Obsolete. | |
GetField | Returns the name of the field. Could return CopyC# null | |
GetHashCode | Returns true if (Overrides Object..::..GetHashCode()()()().)CopyC# o | |
GetLocale | Returns the Locale by which term values are interpreted.
May return CopyC# null | |
GetParser | Returns the instance of a {@link FieldCache} parser that fits to the given sort type.
May return CopyC# null | |
GetReverse | Returns whether the sort should be reversed. | |
GetType | Returns the type of contents in the field. | |
GetUseLegacySearch | Obsolete. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
SetUseLegacySearch | Obsolete. Use legacy IndexSearch implementation: search with a DirectoryReader rather
than passing a single hit collector to multiple SegmentReaders.
| |
ToString | (Overrides Object..::..ToString()()()().) |
Fields
Name | Description | |
---|---|---|
AUTO | 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.
| |
BYTE | Sort using term values as encoded Bytes. Sort values are Byte and
lower values are at the front.
| |
CUSTOM | Sort using a custom Comparator. Sort values are any Comparable and
sorting is done according to natural order.
| |
DOC | Sort by document number (index order). Sort values are Integer and lower
values are at the front.
| |
DOUBLE | Sort using term values as encoded Doubles. Sort values are Double and
lower values are at the front.
| |
FIELD_DOC | Represents sorting by document number (index order). | |
FIELD_SCORE | Represents sorting by document score (relevancy). | |
FLOAT | Sort using term values as encoded Floats. Sort values are Float and
lower values are at the front.
| |
INT | Sort using term values as encoded Integers. Sort values are Integer and
lower values are at the front.
| |
LONG | Sort using term values as encoded Longs. Sort values are Long and
lower values are at the front.
| |
SCORE | Sort by document score (relevancy). Sort values are Float and higher
values are at the front.
| |
SHORT | Sort using term values as encoded Shorts. Sort values are Short and
lower values are at the front.
| |
STRING | Sort using term values as Strings. Sort values are String and lower
values are at the front.
| |
STRING_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.
|