Class LuceneUpdateService

java.lang.Object
org.imixs.workflow.engine.lucene.LuceneUpdateService
All Implemented Interfaces:
UpdateService

public class LuceneUpdateService extends Object implements UpdateService
The LuceneUpdateService provides methods to write Imixs Workitems into a Lucene search index. With the method addWorkitem() a ItemCollection can be added to a lucene search index. The service init method reads the property file 'imixs.properties' from the current classpath to determine the configuration.
  • The property "IndexDir" defines the location of the lucene index
  • The property "FulltextFieldList" lists all fields which should be searchable after a workitem was updated
  • The property "IndexFieldList" lists all fields which should be indexed as keywords by the lucene search engine
The singleton pattern is used to avoid conflicts within multi-thread scenarios. The service is used by the LucenPlugin to update the lucene index during a workflow processing step.
Version:
1.2
Author:
rsoika
See Also:
  • LucenePlugin
  • Constructor Details

    • LuceneUpdateService

      public LuceneUpdateService()
  • Method Details

    • updateIndex

      public void updateIndex(List<ItemCollection> documents)
      This method adds a collection of documents to the Lucene index. The documents are added immediately to the index. Calling this method within a running transaction leads to a uncommitted reads in the index. For transaction control, it is recommended to use instead the the method updateDocumetns() which takes care of uncommitted reads.

      This method is used by the JobHandlerRebuildIndex only.

      Specified by:
      updateIndex in interface UpdateService
      Parameters:
      documents - of ItemCollections to be indexed
      Throws:
      IndexException
    • updateIndex

      public void updateIndex()
      This method flush the event log.
      Specified by:
      updateIndex in interface UpdateService
      See Also: