Interface I_CmsIndexWriter

All Known Subinterfaces:
I_CmsSolrIndexWriter
All Known Implementing Classes:
CmsLuceneIndexWriter, CmsSolrIndexWriter

public interface I_CmsIndexWriter
Abstracts the index writer implementation for the most important index manipulation operations.
Since:
8.0.2
  • Method Details

    • close

      void close() throws IOException
      Close this IndexWriter.

      Throws:
      IOException - thrown if the close action fails.
    • commit

      void commit() throws IOException
      Commit all previous operations.

      Throws:
      IOException - thrown if the commit action fails.
    • deleteDocument

      Delete a document from the index.

      Parameters:
      resource - the resource to delete
      Throws:
      IOException - in case something goes wrong
    • optimize

      void optimize() throws IOException
      Optimizes the index.

      Please note that as of Lucene 3.5, the direct use of optimize is discouraged as Lucene apparently is now able to manage the file structure so efficiently that frequent optimizations are not longer required.

      Throws:
      IOException - thrown if the optimization fails.
    • updateDocument

      void updateDocument(String rootPath, I_CmsSearchDocument document) throws IOException
      Update a document in the index.

      Parameters:
      rootPath - the root path of the document to update
      document - the document to update
      Throws:
      IOException - in case something goes wrong