Configuring Elasticsearch

November 14, 2023
This section is provided for information only. Jahia may not be able to assist you with the configuration of Elasticsearch. Find out more on the support of Augmented Search on-premises.

Component and index templates

Starting with Augmented Search 3.3.0,  index and component templates from Elasticsearch can be used to define settings like sharding or replicas across all the indices managed by Augmented Search.

Augmented Search will deploy a couple of component templates and indices templates on your Elasticsearch, all those names are based on the prefix you define in the Augmented Search configuration file:

  • jahia-as-index-template: will match all indices starting with jahia_as_v3* and being composed of component templates jahia-as-number-of-shards and jahia-as-number-of-replicas
    • this template has a priority of 200
  • jahia-as-file-index-template: will match all indices starting with jahia_as_v3__file* and being composed of component templates jahia-as-number-of-shards and jahia-as-number-of-replicas plus defining a setting for final_pipeline
    • this template has a priority of 201
  • jahia-as-number-of-shards: define the number of shards.
    • The default value is -1, meaning that the number of shards will be estimated based on index size and available heap memory.
  • jahia-as-number-of-replicas: define the number of replicas. By default, the value at creation is solely determined by the number of nodes in your Elasticsearch cluster (1 Node = 0 replica, > 1 Nodes = 1 replica)

Elasticsearch provides documentation on how to manage these templates via API (index template, component template) or via the Index Management page in Kibana.

Those templates are deployed upon selecting a database connection either via the UI or via GraphQL API. Augmented Search will update them on every reindexation.

Advanced Elasticsearch configuration

If needed, you can update the Elasticsearch index mapping and settings. Such configuration will take precedence over settings provided by Augmented Search. To do:

  1. Clone the augmented-search-custom-configuration module
  2. Update configuration files located in src/main/resources/META-INF/configurations/
  3. Build and deploy the module to your Jahia environment
  4. Proceed to a full re-indexing by clicking on Index all in Administration > Server > Configuration > Augmented Search