IndexSorter
Handles how documents should be sorted in an index, both within a segment and between segments.
Implementers must provide the following methods:
.getDocComparator - an object that determines how documents within a segment are to be sorted
.getComparableProviders - an array of objects that return a sortable long value per document and segment
.getProviderName - the SPI-registered name of a SortFieldProvider to serialize the sort
The companion SortFieldProvider should be registered with SPI via META-INF/services
Inheritors
Types
Used for sorting documents across segments
A comparator of doc IDs, used for sorting documents within a segment
Sorts documents based on double values from a NumericDocValues instance
Sorts documents based on float values from a NumericDocValues instance
Sorts documents based on integer values from a NumericDocValues instance
Sorts documents based on long values from a NumericDocValues instance
Provide a NumericDocValues instance for a LeafReader
Provide a SortedDocValues instance for a LeafReader
Sorts documents based on terms from a SortedDocValues instance
Properties
The SPI-registered name of a SortFieldProvider that will deserialize the parent SortField
Functions
Get an array of ComparableProvider, one per segment, for merge sorting documents in different segments
Get a comparator that determines the sort order of docs within a single Reader.