Package org.apache.lucene.util
Class ReaderUtil
- java.lang.Object
-
- org.apache.lucene.util.ReaderUtil
-
public final class ReaderUtil extends Object
Common util methods for dealing withIndexReader
s.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReaderUtil.Gather
Recursively visits all sub-readers of a reader.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
gatherSubReaders(List<IndexReader> allSubReaders, IndexReader reader)
Gathers sub-readers from reader into a List.static Collection<String>
getIndexedFields(IndexReader reader)
static FieldInfos
getMergedFieldInfos(IndexReader reader)
Call this to get the (merged) FieldInfos for a composite readerstatic int
subIndex(int n, int[] docStarts)
Returns index of the searcher/reader for documentn
in the array used to construct this searcher/reader.
-
-
-
Method Detail
-
gatherSubReaders
public static void gatherSubReaders(List<IndexReader> allSubReaders, IndexReader reader)
Gathers sub-readers from reader into a List.- Parameters:
allSubReaders
-reader
-
-
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.
-
getIndexedFields
public static Collection<String> getIndexedFields(IndexReader reader)
-
getMergedFieldInfos
public static FieldInfos getMergedFieldInfos(IndexReader reader)
Call this to get the (merged) FieldInfos for a composite reader
-
-