Maintenance and snapshotsElasticsearch
POST _reindex
Copy documents between indices for migrations or transformations.
Command
curl -X POST "http://:9200/_reindex?pretty" -H 'Content-Type: application/json' -d '{"source":{"index":""},"dest":{"index":""}}'
Example usage
Clone or migrate documents into new indices with optional scripts.
curl -X POST "http://<host>:9200/_reindex?pretty" -H 'Content-Type: application/json' -d '{"source":{"index":"<source>"},"dest":{"index":"<target>"}}'
Related tags
Maintenance and snapshotssearchobservabilityrest-api