com.atlassian.jira.issue.search.util
Class LuceneConnection
java.lang.Object
com.atlassian.jira.issue.search.util.LuceneConnection
- public class LuceneConnection
- extends Object
TODO renetrancy to/from reader/writer ... allow it?
these operations can occur concurrently, using the same reader (writer closed beforehand):
- withQuery
- withReader
these operations will be serialized against all other operatons
- withWriter (closes any readers closed beforehand)
- withReaderAndDeletes (writers closed beforehand, reader+writer closed afterwards)
- optimize (any readers closed beforehand)
- flushWriter (closes readers and writers)
also see:
- "What are all possible concurrent Lucene requests?" http://www.jguru.com/faq/view.jsp?EID=913302
- Author:
- Matt Quail
Constructor Summary |
LuceneConnection(File location,
org.apache.lucene.analysis.Analyzer analyzerForIndexing)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LuceneConnection
public LuceneConnection(File location,
org.apache.lucene.analysis.Analyzer analyzerForIndexing)
getLocation
public File getLocation()
withQuery
public void withQuery(LuceneConnection.QueryAction action)
throws DataAccessException
- Throws:
DataAccessException
withReader
public void withReader(LuceneConnection.ReaderAction action)
throws DataAccessException
- just for queriying, do not delete with this action
- Throws:
DataAccessException
withReaderAndDeletes
public void withReaderAndDeletes(LuceneConnection.ReaderAction action)
throws DataAccessException
- Throws:
DataAccessException
withWriter
public void withWriter(LuceneConnection.WriterAction action)
throws DataAccessException
- Throws:
DataAccessException
optimize
public void optimize()
throws DataAccessException
- Throws:
DataAccessException
configureWriter
public static void configureWriter(org.apache.lucene.index.IndexWriter writer)
- Configures a writer according to our particular requirements
flushWriter
public void flushWriter()
throws DataAccessException
- Throws:
DataAccessException
createIndex
public void createIndex(boolean create)
throws DataAccessException
- Parameters:
create
- true to create the index or overwrite the existing one; false to append to the existing index
- Throws:
DataAccessException
close
public void close()
Copyright © 2002-2006 Atlassian. All Rights Reserved.