Engine
This plugin add workitems to a lucene search index. The Plugin provides a set of static methods which can be used also outside the workflowManager to index single workitems or collections of workitems.
With the method addWorkitem() a ItemCollection can be added to a lucene search index. The Plugin reads the property file 'imixs-search.properties' from the current classpath to determine the configuration.
The configuration of the plugin is provided in a property file named 'imixs-search.properties'. Typical the file can bee bundled with the EJB module.
This is an example for a plugin configuration file:
############################## # Imixs Lucene Plugin ############################## # Search Index Direcotry IndexDir=my-index # Fields to be added into the searchindex FulltextFieldList=txtsearchstring,txtSubject,namCreator,txtWorkflowAbstract IndexFieldListAnalyze=txtSupplier IndexFieldListNoAnalyze=namCreator,$ProcessID,datDate # Matching Patterns to index a workitem MatchingType=workitem MatchingProcessID=
This is the directory on the servers filesystem the lucene index will be created. Make sure that the server has sufficient write access for this location. Using Glassfish Server the example above will create a directory named 'my-index' into the location GLASSFISH_INSTALL/domains/domain1/config/
The property FulltextFieldList defines a comma separated list of fields which will be indexed by the LucenePlugin. The content of these fields will be stored into the lucene field name 'content'. The values will be analyzed with the lucene standard analyzer.
The property IndexFieldListAnalyze defines a comma separated list of fields which will be added as keyword fields into the lucene index. The content of this fields will be analyzed by the lucene standard analyzer.
The property IndexFieldListNoAnalyze defines a comma separated list of fields which will be added as keyword fields into the lucene index. The content of this fields will not be analyzed. So a exact phrase search is possible here.
To search workitems the method search() can be called. The method returns a collection of workitems matching the search term. The LucenePlugin provides all kinds of search terms. Here are some examples of search therms.
The first example searches all workitems with the ProcessID=2010 and a field containing the search phrase 'aaa'
($processid:"2010") AND (*aaa*)
This next example searches all workitems with a $ProcessID >=2000 and <=2999 and a field containing the search phrase 'aaa'
($processid:[2000 TO 2999]) AND (*aaa*)
You can also serach for dateTime value. The following example searches all workitems with a $modified date from 17.Aug.2011 12:00am and a field containing the search phrase 'aaa'
($modified:"201108171200") AND (*aaa*)