Elasticsearch 9 · Indices and mappings

Add an alias

Point an alias at an index, so applications don't depend on the index name.

curl -u elastic:$ELASTIC_PASSWORD --cacert http_ca.crt -X POST "https://localhost:9200/_aliases" -H "Content-Type: application/json" -d '{"actions":[{"add":{"index":"products-v1","alias":"products"}}]}'

Official Elasticsearch 9 documentation

More indices and mappings commands

All indices and mappings commands · Elasticsearch 9 cheatsheet

Was this page helpful?