Class ReaderUtil


  • public final class ReaderUtil
    extends Object
    Common util methods for dealing with IndexReaders.
    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
    • 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 document n in the array used to construct this searcher/reader.
      • getMergedFieldInfos

        public static FieldInfos getMergedFieldInfos​(IndexReader reader)
        Call this to get the (merged) FieldInfos for a composite reader