Class SortingCodecReader

All Implemented Interfaces:
Closeable, AutoCloseable

public final class SortingCodecReader extends FilterCodecReader
An CodecReader which supports sorting documents by a given Sort. This can be used to re-sort and index after it's been created by wrapping all readers of the index with this reader and adding it to a fresh IndexWriter via IndexWriter.addIndexes(CodecReader...). NOTE: This reader should only be used for merging. Pulling fields from this reader might be very costly and memory intensive.
WARNING: This API is experimental and might change in incompatible ways in the next release.