sort

Returns a mapping from the old document ID to its new location in the sorted index. Implementations can use the auxiliary .sort to compute the old-to-new permutation given a list of documents and their corresponding values.

A return value of null is allowed and means that reader is already sorted.

NOTE: deleted documents are expected to appear in the mapping as well, they will however be marked as deleted in the sorted view.


fun sort(maxDoc: Int, comparators: Array<IndexSorter.DocComparator>): Sorter.DocMap?
val sort: Sort