Class ReaderUtil

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ReaderUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method 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, java.util.List<LeafReaderContext> leaves)
      Returns index of the searcher/reader for document n in the array used to construct this searcher/reader.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReaderUtil

        private ReaderUtil()
    • Method Detail

      • getTopLevelContext

        public 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.
      • 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.
      • subIndex

        public static int subIndex​(int n,
                                   java.util.List<LeafReaderContext> leaves)
        Returns index of the searcher/reader for document n in the array used to construct this searcher/reader.