public final class IndexSortConfig
extends java.lang.Object
SortOrder
to use for the field or a list of SortOrder
for each field defined in `index.sort.field`.
MultiValueMode
to use for the field or a list of orders
for each field defined in `index.sort.field`.
Modifier and Type | Field and Description |
---|---|
static Setting<java.util.List<java.lang.String>> |
INDEX_SORT_FIELD_SETTING
The list of field names
|
static Setting<java.util.List<java.lang.String>> |
INDEX_SORT_MISSING_SETTING
The missing value for each specified sort field (ie.
|
static Setting<java.util.List<MultiValueMode>> |
INDEX_SORT_MODE_SETTING
The
MultiValueMode for each specified sort field (ie. |
static Setting<java.util.List<SortOrder>> |
INDEX_SORT_ORDER_SETTING
The
SortOrder for each specified sort field (ie. |
Constructor and Description |
---|
IndexSortConfig(IndexSettings indexSettings) |
Modifier and Type | Method and Description |
---|---|
org.apache.lucene.search.Sort |
buildIndexSort(java.util.function.Function<java.lang.String,MappedFieldType> fieldTypeLookup,
java.util.function.Function<MappedFieldType,IndexFieldData<?>> fieldDataLookup)
Builds the
Sort order from the settings for this index
or returns null if this index has no sort. |
static org.apache.lucene.search.SortField.Type |
getSortFieldType(org.apache.lucene.search.SortField sortField) |
boolean |
hasIndexSort()
Returns true if the index should be sorted
|
public static final Setting<java.util.List<java.lang.String>> INDEX_SORT_FIELD_SETTING
public static final Setting<java.util.List<SortOrder>> INDEX_SORT_ORDER_SETTING
SortOrder
for each specified sort field (ie. asc or desc).public static final Setting<java.util.List<MultiValueMode>> INDEX_SORT_MODE_SETTING
MultiValueMode
for each specified sort field (ie. max or min).public static final Setting<java.util.List<java.lang.String>> INDEX_SORT_MISSING_SETTING
public IndexSortConfig(IndexSettings indexSettings)
public boolean hasIndexSort()
public org.apache.lucene.search.Sort buildIndexSort(java.util.function.Function<java.lang.String,MappedFieldType> fieldTypeLookup, java.util.function.Function<MappedFieldType,IndexFieldData<?>> fieldDataLookup)
Sort
order from the settings for this index
or returns null if this index has no sort.public static org.apache.lucene.search.SortField.Type getSortFieldType(org.apache.lucene.search.SortField sortField)