Package org.apache.lucene.index
Class DocIDMerger<T extends DocIDMerger.Sub>
java.lang.Object
org.apache.lucene.index.DocIDMerger<T>
Utility class to help merging documents from sub-readers according to either simple concatenated
(unsorted) order, or by a specified index-time sort, skipping deleted documents and remapping
non-deleted documents.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents one sub-reader being merged -
Method Summary
Modifier and TypeMethodDescriptionabstract T
next()
Returns null when done.static <T extends DocIDMerger.Sub>
DocIDMerger<T>Construct this from the provided subsstatic <T extends DocIDMerger.Sub>
DocIDMerger<T>Construct this from the provided subs, specifying the maximum sub countabstract void
reset()
Reuse API, currently only used by postings during merge
-
Method Details
-
of
public static <T extends DocIDMerger.Sub> DocIDMerger<T> of(List<T> subs, int maxCount, boolean indexIsSorted) throws IOException Construct this from the provided subs, specifying the maximum sub count- Throws:
IOException
-
of
public static <T extends DocIDMerger.Sub> DocIDMerger<T> of(List<T> subs, boolean indexIsSorted) throws IOException Construct this from the provided subs- Throws:
IOException
-
reset
Reuse API, currently only used by postings during merge- Throws:
IOException
-
next
Returns null when done. NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.- Throws:
IOException
-