Created
March 6, 2012 17:00
-
-
Save outoftime/1987485 to your computer and use it in GitHub Desktop.
Reduction: error when attempting to re-map alias that points to read-only index
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE http://localhost:9200/test1?pretty=true | |
echo '' | |
curl -XDELETE http://localhost:9200/test2?pretty=true | |
echo '' | |
curl -XPUT http://localhost:9200/test1?pretty=true -d '{}' | |
echo '' | |
curl -XPOST http://localhost:9200/_aliases?pretty=true -d '{"actions":[{"add":{"index":"test1","alias":"test"}}]}' | |
echo '' | |
curl -XPUT http://localhost:9200/test2?pretty=true -d '{}' | |
echo '' | |
curl -XPUT http://localhost:9200/test1/_settings?pretty=true -d '{"index":{"blocks":{"read_only":true}}}' | |
echo '' | |
curl -XPOST http://localhost:9200/_aliases?pretty=true -d '{"actions":[{"remove":{"index":"test1","alias":"test"}},{"add":{"index":"test2","alias":"test"}}]}' | |
echo '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment