Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
Issue #555
  • Loading branch information
rsoika committed Aug 26, 2019
1 parent c26f3b5 commit 9b7ea3f
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@
*/
@Singleton
public class SchemaService {


/*
* index.fields
* index.fields.analyse
* index.fields.noanalyse
* index.fields.store
*
* index.operator
* index.splitwhitespace
*
*
*/

@Inject
@ConfigProperty(name = "lucence.fulltextFieldList", defaultValue = "")
Expand Down
51 changes: 45 additions & 6 deletions src/site/markdown/engine/luceneservice.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Lucene Configuration
# The Index Schema

The [Full-Text-Search](queries.html) in Imixs-Workflow is part of the [DocumentService](./documentservice.html) and based on the [Lucene Search Technology](https://lucene.apache.org/) (version 7.5).
The behavior of the search index can be configured and adapted in various ways. The following section gives you an overview how to setup the Lucene Full-Text-Search.
Expand Down Expand Up @@ -60,10 +60,7 @@ A custom configuration for the _Lucene Search Index_ can be provided in the file
lucene.splitOnWhitespace=true


### IndexDir

This is the directory on the servers file system the lucene index will be created. Make sure that
the server has sufficient write access for this location. The root directory is typical the home or installation directory in the runtime environment of your application server.


### FulltextFieldList
The property 'lucene.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.
Expand Down Expand Up @@ -169,4 +166,46 @@ and will return all workitems containing the keywords 'europe', 'berlin' and 'rs

See the section [Query Syntax](queries.html) for more details about the lucene search syntax.






## The Search Engine

The Search Index can be controlled by different search engines and can be extended by custom implementations. The Imixs-Workflow engine provides two search engines:

### 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_'.

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>

### Apache Solr

[Apache Solr](https://lucene.apache.org/solr/) is a highly reliable, scalable and fault tolerant search engine.
Solr is providing distributed indexing and replication and can be deployed in a microservice architecture as well in large distributed cloud environments.

You need to setup a Solr server environment to use the Solr Search Engine. To activate the Solr Engine you need to add the following dependency:

<dependency>
<groupId>org.imixs.workflow</groupId>
<artifactId>imixs-workflow-solr</artifactId>
<version>${org.imixs.workflow.version}</version>
</dependency>
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.


### 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:

- **SearchService** - provides method to search an index
- **UpdateService** - is responsible to build the search index.

17 changes: 6 additions & 11 deletions src/site/markdown/engine/queries.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# The Full-Text-Search
# The Search Index

The Imixs-Workflow engine provides a **Full-Text-Search** based on the [Lucene Search Technology](https://lucene.apache.org/).
The Full-Text-Search is part of the [DocumentService](./documentservice.html) controlling the search index and providing search methods.
The Imixs-Workflow engine provides a **Full-Text-Search** based on the [Lucene Search Technology](https://lucene.apache.org/). The search index is managed by the [DocumentService](./documentservice.html), which offers various search methods.
You can search documents by search terms like "cat" or "dog*" and you can also define complex queries to select documents with specific search criteria.

The Search-Index allows you to search documents by a single _search term_ such as "cat" or "dog".
Or you can define a _search query_ selecting documents with specific search criteria.

The Search-Index can also store search data, which dramatically speeds up the document access. The following section gives you an overview how a search term can be assembled from the very powerful [Lucene Query Syntax](https://lucene.apache.org/core/7_5_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package.description).
The Search-Index stores also parts of a document, which dramatically speeds up the document access. The following section gives you an overview how a search term can be assembled from the very powerful [Lucene Query Syntax](https://lucene.apache.org/core/7_5_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package.description).

## How to Search Documents

Expand Down Expand Up @@ -97,9 +95,6 @@ In java you can format a Date object into the lucene syntax with a Forater objec
See the [Lucene Query Syntax](https://lucene.apache.org/core/7_5_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package.description) for further information.


## How to Setup a Custom Search Index
## How to Setup an Index Schema

In the section [Lucene Configuration](luceneservice.html) you will find detailed information you to setup and customize the search index of Imixs-Workflow.


In the section [Index Schema](luceneservice.html) you will find detailed information how to setup and customize the search index by defining an Index Schema and a Search Engine.
4 changes: 2 additions & 2 deletions src/site/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
<item name="WorkflowService" href="./engine/workflowservice.html" />
<item name="ModelService" href="./engine/modelservice.html" />
<item name="DocumentService" href="./engine/documentservice.html" />
<item name="Full-Text-Search" href="./engine/queries.html"
<item name="Search Index" href="./engine/queries.html"
collapse="true">
<item name="Configuration" href="./engine/luceneservice.html" />
<item name="Index Schema" href="./engine/luceneservice.html" />
</item>
<item name="Security Model" href="./engine/acl.html" />
<item name="AccessAdapter" href="./engine/adapters/accessadapter.html" />
Expand Down

0 comments on commit 9b7ea3f

Please sign in to comment.