elasticsearch/elasticsearch — Issue #1762: Can't remap index alias pointing to read-only index
Author: outoftime
Created: 2012-03-06 17:00:21+00:00
State: open

See reduction ([download](https://raw.github.com/gist/1987485/f658b25f70d51bc1736c2741697719dd5e1e8809/remap-readonly.sh)):

curl -XPUT http://localhost:9200/test1/_settings?pretty=true -d '{"index":{"blocks":{"read_only":false}}}'
echo ''
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 ''