Elasticsearch 9 · Indices and mappings
Copy documents to a new index
Copy documents from one index to another, for example after changing a mapping.
curl -u elastic:$ELASTIC_PASSWORD --cacert http_ca.crt -X POST "https://localhost:9200/_reindex" -H "Content-Type: application/json" -d '{"source":{"index":"products-v1"},"dest":{"index":"products-v2"}}'
Official Elasticsearch 9 documentation
More indices and mappings commands
All indices and mappings commands · Elasticsearch 9 cheatsheet