| Back | Main view

IMiS ARChive Elasticsearch plugin configuration

Product:IMiS/ARChive
Release:Since 10.3.2210
Date:01/19/2024

Case: IMiS ARChive supports Elasticsearch search engine for indexing and searching documents, saved on server. In this article we describe, how to configure Elasticsearch plugin for search and indexing process.

Description:

IMiS ARChive supports searching and indexing using Elasticsearch as external search engine. Elasticsearch search engine is accessed through IMiS ARChive plugin. Plugin is configured with xml configuration tags, which are listed in next sections:

Network related xml tags:
Elasticsearch related xml tags:
Next table demonstrates translation between supported IMiS ARChive and Elasticsearch plugin attribute types. These types are used during configuration of "FTSDisabledPropertyName" and "FTSEnabledPropertyName":

IMiS ARChive attribute type
Elasticsearch plugin attribute type
STRING10
18
STRING20
19
STRING30
20
STRING40
21
STRING50
22
STRING100
23
STRING200
24
FILE
42

By default, full text search uses all searchable attributes of type "string" (STRING10 to STRING200) and searchable attributes of type FILE. By defining "FTSDisabledPropertyName" tag, attribute is excluded from full text search. If tag is removed, then attribute is used again in full text search operation. This is preferred way for enabling or disabling full text search attributes instead of using "FTSEnabledPropertyName" configuration tag.

Processing order of disabled and enabled full text search properties:
Plugin uses Elasticsearch query DSL (query domain language) to perform different search operations:
There are a few limitations between searching with Elasticsearch engine or IMiS ARChive embedded database:
Full text search is always executed on Elasticsearch engine. Manual search with attributes may be executed either on Elasticsearch or on IMiS ARChive embedded database.

When Elasticsearch plugin configuration is changed, IMiS ARChive server must be restarted in order the changes to take effect. Next examples demonstrates Elasticsearch plugin configuration.

Exmple 1: Default configuration with http authentication:

<Arguments>
  <IndexUrl>https://elastic-server:9200/imis-archive-fti-index/</IndexUrl>
  <AuthenticationUsername>username</AuthenticationUsername>
  <AuthenticationPassword>password</AuthenticationPassword>
  <SSLTSType>JKS</SSLTSType>
  <SSLTSFile>/iarc/work/fti/es.jks</SSLTSFile>
  <SSLTSPassword>password</SSLTSPassword>
  <SSLProtocols>TLS</SSLProtocols>
</Arguments>

Example 2: Default configuration with API key authentication:

<Arguments>
  <IndexUrl>https://elastic-server:9200/imis-archive-fti-index/</IndexUrl>
  <ApiKey>base64 encoded elasticsearch api key</ApiKey>
  <SSLTSType>JKS</SSLTSType>
  <SSLTSFile>/iarc/work/fti/es.jks</SSLTSFile>
  <SSLTSPassword>password</SSLTSPassword>
  <SSLProtocols>TLS</SSLProtocols>
</Arguments>

Example 3: Attribute 'sys:Content' is excluded from full text search:

<Arguments>
  <IndexUrl>https://elastic-server:9200/imis-archive-fti-index/</IndexUrl>
  <AuthenticationUsername>username</AuthenticationUsername>
  <AuthenticationPassword>password</AuthenticationPassword>
  <SSLTSType>JKS</SSLTSType>
  <SSLTSFile>/iarc/work/fti/es.jks</SSLTSFile>
  <SSLTSPassword>password</SSLTSPassword>
  <SSLProtocols>TLS</SSLProtocols>
  <FTSDisabledPropertyName type="42">sys:Content</FTSDisabledPropertyName>
</Arguments>

Searching on 'sys:Content' is still possible by explicit attribute search.

Example 4: Content indexing limit to 40MB:

<Arguments>
  <IndexUrl>https://elastic-server:9200/imis-archive-fti-index/</IndexUrl>
  <AuthenticationUsername>username</AuthenticationUsername>
  <AuthenticationPassword>password</AuthenticationPassword>
  <SSLTSType>JKS</SSLTSType>
  <SSLTSFile>/iarc/work/fti/es.jks</SSLTSFile>
  <SSLTSPassword>password</SSLTSPassword>
  <SSLProtocols>TLS</SSLProtocols>
  <MaxContentLength>41943040</MaxContentLength>
</Arguments>

Related Documents:

https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-nested-query.html
https://www.infoq.com/articles/similarity-scoring-elasticsearch/
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html

| Back | Main view