Skip to content

Commit

Permalink
updated docu
Browse files Browse the repository at this point in the history
Issue imixs#554
  • Loading branch information
rsoika committed Sep 21, 2019
1 parent 1da4634 commit fd8ad65
Showing 1 changed file with 39 additions and 19 deletions.
58 changes: 39 additions & 19 deletions src/site/markdown/engine/luceneservice.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,15 @@ You can later load the full document by the $uniqueid which is part of the docum


## Custom Configuration
A custom configuration for the _Lucene Search Index_ can be provided in the file _imixs.properties_. The following example shows an example:
A custom configuration for the _Index Schma_ can be provided in the file _imixs.properties_. The following example shows an example:

##############################
# Imixs Lucene Service
# Imixs-Workflow Index Schema
##############################

# Search Index Direcotry
lucence.indexDir=${imixs-office.IndexDir}
# Fields to be added into the searchindex
index.fields=txtsearchstring,txtSubject,txtname,txtEmail,txtWorkflowAbstract,txtWorkflowSummary
index.fields.analyze=
index.fields.noanalyze=datDate,txtWorkflowGroup,txtemail, datdate, datfrom, datto, numsequencenumber, txtUsername
lucene.defaultOperator=AND
lucene.splitOnWhitespace=true




### index.fields
Expand All @@ -74,17 +67,10 @@ The property 'index.fields.noanalyze' defines a comma separated list of fields w
### index.fields.store
The property 'index.fields.store' defines a comma separated list of fields to be stored into the search index. This kind of data can be requested by the method findStubs(). This finder method is faster but did not load the whole document.




### defaultOperator
### index.defaultOperator
The defaultOperator sets the boolean operator of the QueryParser. In default mode (AND\_OPERATOR) terms without any modifiers are considered optional: for example _capital of France_ is equal to _capital AND of AND France_.
In OR\_OPERATOR mode terms are considered to be in conjunction: the above mentioned query is parsed as _capital OR of OR France_

### splitOnWhitespace
Whether query text should be split on whitespace prior to analysis. Default is true. For example _cat dog_ will be treated as _cat AND dog_



## How to Initialize the Lucene Index

Expand Down Expand Up @@ -176,15 +162,28 @@ The Search Index can be controlled by different search engines and can be extend

### Apache Lucene Core

[Apache Lucene Core](https://lucene.apache.org/core/) is the default search engine for Imixs-Workflow. The index is created in the local file system and is very fast. It's the best choice for a workflow instance in a single-server environment. The index location is defined by the imixs.property '_lucence.indexDir_'.

[Apache Lucene Core](https://lucene.apache.org/core/) is the default search engine for Imixs-Workflow. The index is created in the local file system and is very fast. It's the best choice for a workflow instance in a single-server environment.
To activate the Lucene Core Engine you just have to add the following dependency:

<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-workflow-lucene</artifactId>
<version>${org.imixs.workflow.version}</version>
</dependency>

The index location in the local file system can be defined by the imixs.property '_lucence.indexDir_'. The property can set in the imixs.properies file together with the index schema configuration:


# Fields to be added into the searchindex
index.fields=txtsearchstring,txtSubject,txtname,txtEmail,txtWorkflowAbstract,txtWorkflowSummary
index.fields.analyze=
index.fields.noanalyze=datDate,txtWorkflowGroup,txtemail, datdate, datfrom, datto, numsequencenumber, txtUsername
# Search Index Direcotry
lucence.indexDir=${imixs-office.IndexDir}


The default location will be the directory 'imixs-workflow-index'


### Apache Solr

Expand All @@ -202,6 +201,27 @@ You need to setup a Solr server environment to use the Solr Search Engine. To ac
Apache Solr provides a lot of flexibility in configuration and offers additional features like translation or suggestion. In this way you can control the Imixs Search Index in a more fine grained way.


There is a set of optional properties which can be set to access the solr instance:

- _solr.server_ - solr host (default http://solr:8983);
- _solr.core_ - the solr core (default 'imixs-workflow')
- _solr.configset_ - an optional solr config set (default set is '_default')
- _solr.user_ - optional user id to login
- _solr.password_ - optional user password to login

The optional parameter can be set together with the the index schema configuration:


# Fields to be added into the searchindex
index.fields=txtsearchstring,txtSubject,txtname,txtEmail,txtWorkflowAbstract,txtWorkflowSummary
index.fields.analyze=
index.fields.noanalyze=datDate,txtWorkflowGroup,txtemail, datdate, datfrom, datto, numsequencenumber, txtUsername
# Solr configuration
solr.server=http://my-solr-host:8983




### Build Your Custom Search Engine

You can also extend Imixs-Workflow Search engines or you can implement your own custom search engine. Therefor you need to implement the following interfaces and deploy your engine together with the Imixs-Workflow engine:
Expand Down

0 comments on commit fd8ad65

Please sign in to comment.