Package org.h2.fulltext
Class FullTextLucene.IndexAccess
- java.lang.Object
-
- org.h2.fulltext.FullTextLucene.IndexAccess
-
- Enclosing class:
- FullTextLucene
private static final class FullTextLucene.IndexAccess extends java.lang.Object
A wrapper for the Lucene writer and searcher.
-
-
Constructor Summary
Constructors Constructor Description IndexAccess(org.apache.lucene.index.IndexWriter writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the index.void
commit()
Commit the changes.(package private) org.apache.lucene.search.IndexSearcher
getSearcher()
Start using the searcher.private void
initializeSearcher()
(package private) void
returnSearcher(org.apache.lucene.search.IndexSearcher searcher)
Stop using the searcher.
-
-
-
Method Detail
-
getSearcher
org.apache.lucene.search.IndexSearcher getSearcher() throws java.io.IOException
Start using the searcher.- Returns:
- the searcher
- Throws:
java.io.IOException
- on failure
-
initializeSearcher
private void initializeSearcher() throws java.io.IOException
- Throws:
java.io.IOException
-
returnSearcher
void returnSearcher(org.apache.lucene.search.IndexSearcher searcher) throws java.io.IOException
Stop using the searcher.- Parameters:
searcher
- the searcher- Throws:
java.io.IOException
- on failure
-
commit
public void commit() throws java.io.IOException
Commit the changes.- Throws:
java.io.IOException
- on failure
-
close
public void close() throws java.io.IOException
Close the index.- Throws:
java.io.IOException
- on failure
-
-