Zero-Downtime Reindexing in OpenSearch with Aliases
· 5 min read
OpenSearch index mappings are immutable once data is indexed. Changing a field type (for example, from text to keyword for a product SKU) or adding an analyzer to an existing field requires creating a new index and moving data into it. The challenge is doing this without taking your search API offline. The answer is aliases combined with the _reindex API. This post demonstrates the full pattern on a live OpenSearch 2.19.1 cluster managed by FoundryDB.
All commands use YOUR_OPENSEARCH_HOST and YOUR_PASSWORD as placeholders.