public static enum SortField.Type extends Enum<SortField.Type>
Enum Constant and Description |
---|
CUSTOM
Sort using a custom Comparator.
|
DOC
Sort by document number (index order).
|
DOUBLE
Sort using term values as encoded Doubles.
|
FLOAT
Sort using term values as encoded Floats.
|
INT
Sort using term values as encoded Integers.
|
LONG
Sort using term values as encoded Longs.
|
REWRITEABLE
Force rewriting of SortField using
SortField.rewrite(IndexSearcher)
before it can be used for sorting |
SCORE
Sort by document score (relevance).
|
STRING
Sort using term values as Strings.
|
STRING_VAL
Sort using term values as Strings, but comparing by
value (using String.compareTo) for all comparisons.
|
Modifier and Type | Method and Description |
---|---|
static SortField.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SortField.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SortField.Type SCORE
public static final SortField.Type DOC
public static final SortField.Type STRING
public static final SortField.Type INT
public static final SortField.Type FLOAT
public static final SortField.Type LONG
public static final SortField.Type DOUBLE
public static final SortField.Type CUSTOM
public static final SortField.Type STRING_VAL
STRING
, which
uses ordinals to do the sorting.public static final SortField.Type REWRITEABLE
SortField.rewrite(IndexSearcher)
before it can be used for sortingpublic static SortField.Type[] values()
for (SortField.Type c : SortField.Type.values()) System.out.println(c);
public static SortField.Type valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.