reorder

open fun reorder(reader: CodecReader, dir: Directory, executor: Executor): Sorter.DocMap?

Extend this method if you wish to renumber doc IDs. This method will be called when index sorting is disabled on a merged view of the OneMerge. A null return value indicates that doc IDs should not be reordered.

NOTE: Returning a non-null value here disables several optimizations and increases the merging overhead.

Parameters

reader

The reader to reorder.

dir

The Directory of the index, which may be used to create temporary files.

executor

An executor that can be used to parallelize the reordering logic. May be null if no concurrency is supported.