java.lang.Object
org.apache.lucene.index.ReaderUtil
Common util methods for dealing with
IndexReader
s and IndexReaderContext
s.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IndexReaderContext
getTopLevelContext
(IndexReaderContext context) Walks up the reader tree and return the given context's top level reader context, or in other words the reader tree's root context.static int
subIndex
(int n, int[] docStarts) Returns index of the searcher/reader for documentn
in the array used to construct this searcher/reader.static int
subIndex
(int n, List<LeafReaderContext> leaves) Returns index of the searcher/reader for documentn
in the array used to construct this searcher/reader.
-
Constructor Details
-
ReaderUtil
private ReaderUtil()
-
-
Method Details
-
getTopLevelContext
Walks up the reader tree and return the given context's top level reader context, or in other words the reader tree's root context. -
subIndex
public static int subIndex(int n, int[] docStarts) Returns index of the searcher/reader for documentn
in the array used to construct this searcher/reader. -
subIndex
Returns index of the searcher/reader for documentn
in the array used to construct this searcher/reader.
-