Configuring index settings on OpenSearch

Still need help?

The Atlassian Community is here for you.

Ask the community

As an administrator, there are a number of settings you can configure on your OpenSearch indexes, such as the number of shards and replicas, or the refresh interval. You can refer to the Index settings page for more detail.

However, note that all settings you apply on your OpenSearch indexes will be lost when you rebuild a Confluence index. This is because, when rebuilding the index, Confluence will create new OpenSearch indexes, and delete the old ones.

To apply index settings permanently, after rebuilding the index, you can make use of index templates.

For example, to apply settings on the content index, you can create an index template that targets confluence-content_* via the REST API:

PUT https://my-opensearch/_index_template/content-template
{
  "index_patterns": [
    "confluence-content_*"
  ],
  "template": {
    "settings": {
      "number_of_replicas": 3,
      "refresh_interval": "5s"
    }
  }
}


This will create an index template that applies the settings for the number of replicas and the refresh interval on future content indexes that Confluence creates.

Note that you will still need to apply the same settings to your current index as well, either via the REST API (Update settings) or by rebuilding your Confluence index if that’s practical (a very large dataset will take a long time to reindex).


Last modified on Jul 30, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.