Copy the Index to a new index,
curl -X POST "https://localhost:9200/_reindex" -H 'Content-Type: application/json' -k -u username:password -d'
Delete the old Index,{"source": {"index": "old-index"},"dest": {"index": "new-index"}}'
curl -X DELETE "https://localhost:9200/index-name" -k -u username:password
Add alias,
curl -X POST "https://localhost:9200/_aliases" -H 'Content-Type: application/json' -k -u user:password -d'{"actions" : [{ "add" : { "index" : "index-name", "alias" : "alias-name" } }]}'
Show alias
curl -X GET "https://localhost:9200/_alias/fla*" -k -u username:password
Comments
Post a Comment