Interface IndexReaderProvider

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()
      Closes and drops any cached resources (index readers in particular).
      org.apache.lucene.index.DirectoryReader getOrCreate()  
      void refresh()
      Make sure the index reader returned by the next call to getOrCreate() will return an up-to-date view of the index.
    • Method Detail

      • clear

        void clear()
            throws IOException
        Closes and drops any cached resources (index readers in particular).

        Should be used when stopping the index or to clean up upon error.

        Throws:
        IOException
      • refresh

        void refresh()
        Make sure the index reader returned by the next call to getOrCreate() will return an up-to-date view of the index.
      • getOrCreate

        org.apache.lucene.index.DirectoryReader getOrCreate()
                                                     throws IOException
        Returns:
        A ready-to-use index reader, with its reference count already increased. Callers are responsible for calling IndexReader.decRef() when they are done with the index reader. Callers must not call IndexReader.close(), as the index reader may be shared.
        Throws:
        IOException