Configuring Elasticsearch
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.
Roles
In case you use custom rules, here are the expected privileges:
- at the cluster level: monitor, manage and manage_index_templates
- at the index level, for all indexes starting with the prefix configured: all
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:
- Clone the augmented-search-custom-configuration module
- Update configuration files located in
src/main/resources/META-INF/configurations/
- Build and deploy the module to your Jahia environment
- Proceed to a full re-indexing by clicking on Index all in Administration > Server > Configuration > Augmented Search