Package org.apache.lucene.index
Class ReaderUtil
- java.lang.Object
- 
- org.apache.lucene.index.ReaderUtil
 
- 
 public final class ReaderUtil extends Object Common util methods for dealing withIndexReaders andIndexReaderContexts.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
 
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static IndexReaderContextgetTopLevelContext(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 intsubIndex(int n, int[] docStarts)Returns index of the searcher/reader for documentnin the array used to construct this searcher/reader.static intsubIndex(int n, List<LeafReaderContext> leaves)Returns index of the searcher/reader for documentnin the array used to construct this searcher/reader.
 
- 
- 
- 
Method Detail- 
getTopLevelContextpublic static 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.
 - 
subIndexpublic static int subIndex(int n, int[] docStarts)Returns index of the searcher/reader for documentnin the array used to construct this searcher/reader.
 - 
subIndexpublic static int subIndex(int n, List<LeafReaderContext> leaves)Returns index of the searcher/reader for documentnin the array used to construct this searcher/reader.
 
- 
 
-