|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.search.CmsLuceneIndexWriter
public class CmsLuceneIndexWriter
Delegates indexing to a standard Lucene IndexWriter.
Field Summary | |
---|---|
static int |
COMMIT_OPTIMIZE_THRESHOLD
The threshold for the commits until optimize is called. |
protected static org.apache.commons.logging.Log |
LOG
The log object for this class. |
Constructor Summary | |
---|---|
CmsLuceneIndexWriter(org.apache.lucene.index.IndexWriter indexWriter)
Creates a new index writer based on the provided standard Lucene IndexWriter. |
|
CmsLuceneIndexWriter(org.apache.lucene.index.IndexWriter indexWriter,
CmsSearchIndex index)
Creates a new index writer based on the provided standard Lucene IndexWriter for the provided OpenCms search index instance. |
Method Summary | |
---|---|
void |
close()
Close this IndexWriter. |
void |
commit()
Commit all previous operations. |
void |
deleteDocuments(String rootPath)
Delete a document from the index. |
void |
optimize()
Optimizes the index. |
void |
updateDocument(String rootPath,
org.apache.lucene.document.Document document)
Update a document in the index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int COMMIT_OPTIMIZE_THRESHOLD
protected static final org.apache.commons.logging.Log LOG
Constructor Detail |
---|
public CmsLuceneIndexWriter(org.apache.lucene.index.IndexWriter indexWriter)
indexWriter
- the standard Lucene IndexWriter to use as delegatepublic CmsLuceneIndexWriter(org.apache.lucene.index.IndexWriter indexWriter, CmsSearchIndex index)
The OpenCms search instance is currently used only for improved logging of the index operations.
indexWriter
- the standard Lucene IndexWriter to use as delegateindex
- the OpenCms search index instance this writer to supposed to write toMethod Detail |
---|
public void close() throws IOException
I_CmsIndexWriter
close
in interface I_CmsIndexWriter
IOException
I_CmsIndexWriter.close()
public void commit() throws IOException
I_CmsIndexWriter
commit
in interface I_CmsIndexWriter
IOException
I_CmsIndexWriter.commit()
public void deleteDocuments(String rootPath) throws IOException
I_CmsIndexWriter
deleteDocuments
in interface I_CmsIndexWriter
rootPath
- the root path of the document to delete
IOException
- in case something goes wrongI_CmsIndexWriter.deleteDocuments(java.lang.String)
public void optimize() throws IOException
I_CmsIndexWriter
optimize
in interface I_CmsIndexWriter
IOException
I_CmsIndexWriter.optimize()
public void updateDocument(String rootPath, org.apache.lucene.document.Document document) throws IOException
I_CmsIndexWriter
updateDocument
in interface I_CmsIndexWriter
rootPath
- the root path of the document to updatedocument
- the document to update
IOException
- in case something goes wrongI_CmsIndexWriter.updateDocument(java.lang.String, org.apache.lucene.document.Document)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |