Search code examples
amazon-web-serviceselasticsearchamazon-opensearch

request close index is not allowed by Amazon Elasticsearch Service


I can not close the index on Amazon OpenSearch Service

I'm using Amazon OpenSearch Service with elasticsearch version is 6.3 and 6.8. I want to update the setting to add an analyzer. I have read the docs. I need to close the index and update setting and then open index again. When I'm trying to close the index, I got this error:

{"Message":"Your request: '/my_index/_close' is not allowed by Amazon Elasticsearch Service."}

How can I update my setting? Thank a lot!


Solution

  • It's not possible to use _close API on AWS managed ES lower than 7.4. You can check the official troubleshooting guide about it.

    1. To use _close API, you have to upgrade your elasticsearch to version 7.4 or greater. There are a lot of deprecation settings between version 6 and 7. Please check the deprecation settings before upgrade ES.

    2. Another method is creating a new index with custom analyzer and reindexing data into that index.

    OpenSearch Service supports the _close API only for OpenSearch and Elasticsearch versions 7.4 and later. If you're using an older version and are restoring an index from a snapshot, you can delete the existing index (before or after reindexing it).