final class MultiSorter
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
private static interface |
MultiSorter.ComparableProvider
Returns an object for this docID whose .compareTo represents the requested
SortField sort order. |
private static class |
MultiSorter.LeafAndDocID |
| Constructor and Description |
|---|
MultiSorter() |
| Modifier and Type | Method and Description |
|---|---|
private static MultiSorter.ComparableProvider[] |
getComparableProviders(java.util.List<CodecReader> readers,
SortField sortField)
Returns
ComparableProviders for the provided readers to represent the requested SortField sort order. |
(package private) static MergeState.DocMap[] |
sort(Sort sort,
java.util.List<CodecReader> readers)
Does a merge sort of the leaves of the incoming reader, returning
MergeState.DocMap to map each leaf's
documents into the merged segment. |
static MergeState.DocMap[] sort(Sort sort, java.util.List<CodecReader> readers) throws java.io.IOException
MergeState.DocMap to map each leaf's
documents into the merged segment. The documents for each incoming leaf reader must already be sorted by the same sort!
Returns null if the merge sort is not needed (segments are already in index sort order).java.io.IOExceptionprivate static MultiSorter.ComparableProvider[] getComparableProviders(java.util.List<CodecReader> readers, SortField sortField) throws java.io.IOException
ComparableProviders for the provided readers to represent the requested SortField sort order.java.io.IOException