mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
Currently for field sorting we always use a custom sort field and a custom comparator source. Though for numeric fields this custom sort field could be replaced with a standard SortedNumericSortField unless the field is nested especially since we removed the FieldData for numerics. We can also use a SortedSetSortField for string sort based on doc_values when the field is not nested. This change replaces IndexFieldData#comparatorSource with IndexFieldData#sortField that returns a Sorted{Set,Numeric}SortField when possible or a custom sort field when the field sort spec is not handled by the SortedSortFields.