Class FullTextLucene.IndexAccess

java.lang.Object
org.h2.fulltext.FullTextLucene.IndexAccess
Enclosing class:
FullTextLucene

private static final class FullTextLucene.IndexAccess extends Object
A wrapper for the Lucene writer and searcher.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private org.apache.lucene.search.IndexSearcher
    The index searcher.
    (package private) final org.apache.lucene.index.IndexWriter
    The index writer.
  • Constructor Summary

    Constructors
    Constructor
    Description
    IndexAccess(org.apache.lucene.index.IndexWriter writer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the index.
    void
    Commit the changes.
    (package private) org.apache.lucene.search.IndexSearcher
    Start using the searcher.
    private void
     
    (package private) void
    returnSearcher(org.apache.lucene.search.IndexSearcher searcher)
    Stop using the searcher.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • writer

      final org.apache.lucene.index.IndexWriter writer
      The index writer.
    • searcher

      private org.apache.lucene.search.IndexSearcher searcher
      The index searcher.
  • Constructor Details

  • Method Details

    • getSearcher

      org.apache.lucene.search.IndexSearcher getSearcher() throws IOException
      Start using the searcher.
      Returns:
      the searcher
      Throws:
      IOException - on failure
    • initializeSearcher

      private void initializeSearcher() throws IOException
      Throws:
      IOException
    • returnSearcher

      void returnSearcher(org.apache.lucene.search.IndexSearcher searcher) throws IOException
      Stop using the searcher.
      Parameters:
      searcher - the searcher
      Throws:
      IOException - on failure
    • commit

      public void commit() throws IOException
      Commit the changes.
      Throws:
      IOException - on failure
    • close

      public void close() throws IOException
      Close the index.
      Throws:
      IOException - on failure