public final class ReaderUtil extends Object
IndexReader
s and IndexReaderContext
s.Modifier and Type | Method and Description |
---|---|
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.
|
static int |
subIndex(int n,
int[] docStarts)
Returns index of the searcher/reader for document
n in the
array used to construct this searcher/reader. |
static int |
subIndex(int n,
List<LeafReaderContext> leaves)
Returns index of the searcher/reader for document
n in the
array used to construct this searcher/reader. |
public static IndexReaderContext getTopLevelContext(IndexReaderContext context)
public static int subIndex(int n, int[] docStarts)
n
in the
array used to construct this searcher/reader.public static int subIndex(int n, List<LeafReaderContext> leaves)
n
in the
array used to construct this searcher/reader.Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.