public class IndexAccessorImpl extends java.lang.Object implements IndexAccessor
DEFAULT_LAST_GENERATION| Constructor and Description |
|---|
IndexAccessorImpl(long companyId) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.search.IndexSearcher |
acquireIndexSearcher() |
void |
addDocument(org.apache.lucene.document.Document document) |
void |
addDocuments(java.util.Collection<org.apache.lucene.document.Document> documents) |
void |
close() |
void |
delete() |
void |
deleteDocuments(org.apache.lucene.index.Term term) |
void |
dumpIndex(java.io.OutputStream outputStream) |
long |
getCompanyId() |
long |
getLastGeneration() |
org.apache.lucene.store.Directory |
getLuceneDir() |
void |
invalidate() |
void |
loadIndex(java.io.InputStream inputStream) |
void |
releaseIndexSearcher(org.apache.lucene.search.IndexSearcher indexSearcher) |
void |
updateDocument(org.apache.lucene.index.Term term,
org.apache.lucene.document.Document document) |
public org.apache.lucene.search.IndexSearcher acquireIndexSearcher()
throws java.io.IOException
acquireIndexSearcher in interface IndexAccessorjava.io.IOExceptionpublic void addDocument(org.apache.lucene.document.Document document)
throws java.io.IOException
addDocument in interface IndexAccessorjava.io.IOExceptionpublic void addDocuments(java.util.Collection<org.apache.lucene.document.Document> documents)
throws java.io.IOException
addDocuments in interface IndexAccessorjava.io.IOExceptionpublic void close()
close in interface IndexAccessorpublic void delete()
delete in interface IndexAccessorpublic void deleteDocuments(org.apache.lucene.index.Term term)
throws java.io.IOException
deleteDocuments in interface IndexAccessorjava.io.IOExceptionpublic void dumpIndex(java.io.OutputStream outputStream)
throws java.io.IOException
dumpIndex in interface IndexAccessorjava.io.IOExceptionpublic long getCompanyId()
getCompanyId in interface IndexAccessorpublic long getLastGeneration()
getLastGeneration in interface IndexAccessorpublic org.apache.lucene.store.Directory getLuceneDir()
getLuceneDir in interface IndexAccessorpublic void invalidate()
invalidate in interface IndexAccessorpublic void loadIndex(java.io.InputStream inputStream)
throws java.io.IOException
loadIndex in interface IndexAccessorjava.io.IOExceptionpublic void releaseIndexSearcher(org.apache.lucene.search.IndexSearcher indexSearcher)
throws java.io.IOException
releaseIndexSearcher in interface IndexAccessorjava.io.IOExceptionpublic void updateDocument(org.apache.lucene.index.Term term,
org.apache.lucene.document.Document document)
throws java.io.IOException
updateDocument in interface IndexAccessorjava.io.IOException