Steps to Load OpenSearch Templates Manually

Manually loading OpenSearch index templates and verifying template load status.

1 min read Updated SS

Loading OpenSearch manually helps because it allows you to define the structure of the index in advance, including the mapping of fields and their data types. This helps ensure that data is indexed correctly and can be searched and queried efficiently.

1. Navigate inside the OpenSearch artifact folder by executing the following command:

<installer path>/Appsone-service/OpenSearch-artifact

2. Check the available templates in the cluster by running:

curl -k -u 'admin:admin' -XGET "https://<IP address>:<port>/_cat/templates?v"

3. Check the template status by running this Consul command:

consul kv get service/opensearch/templateloadStatus

Note: The default status is false.

a) If the templates are not available or are missing, and the template load status is true, change the status to false:

consul kv put service/opensearch/templateloadStatus false

b) Execute the script below to create the templates:

Opensearch-url.sh

4. Perform step 2 again to verify that the templates are listed.