Module org.apache.lucene.core
Package org.apache.lucene.index
Class DocIDMerger<T extends DocIDMerger.Sub>
- java.lang.Object
-
- org.apache.lucene.index.DocIDMerger<T>
-
- Direct Known Subclasses:
DocIDMerger.SequentialDocIDMerger
,DocIDMerger.SortedDocIDMerger
public abstract class DocIDMerger<T extends DocIDMerger.Sub> extends java.lang.Object
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
Nested Classes Modifier and Type Class Description private static class
DocIDMerger.SequentialDocIDMerger<T extends DocIDMerger.Sub>
private static class
DocIDMerger.SortedDocIDMerger<T extends DocIDMerger.Sub>
static class
DocIDMerger.Sub
Represents one sub-reader being merged
-
Constructor Summary
Constructors Modifier Constructor Description private
DocIDMerger()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract T
next()
Returns null when done.static <T extends DocIDMerger.Sub>
DocIDMerger<T>of(java.util.List<T> subs, boolean indexIsSorted)
Construct this from the provided subsstatic <T extends DocIDMerger.Sub>
DocIDMerger<T>of(java.util.List<T> subs, int maxCount, boolean indexIsSorted)
Construct this from the provided subs, specifying the maximum sub countabstract void
reset()
Reuse API, currently only used by postings during merge
-
-
-
Method Detail
-
of
public static <T extends DocIDMerger.Sub> DocIDMerger<T> of(java.util.List<T> subs, int maxCount, boolean indexIsSorted) throws java.io.IOException
Construct this from the provided subs, specifying the maximum sub count- Throws:
java.io.IOException
-
of
public static <T extends DocIDMerger.Sub> DocIDMerger<T> of(java.util.List<T> subs, boolean indexIsSorted) throws java.io.IOException
Construct this from the provided subs- Throws:
java.io.IOException
-
reset
public abstract void reset() throws java.io.IOException
Reuse API, currently only used by postings during merge- Throws:
java.io.IOException
-
next
public abstract T next() throws java.io.IOException
Returns null when done. NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.- Throws:
java.io.IOException
-
-