Skip to content

Instantly share code, notes, and snippets.

@nik9000
Created July 10, 2013 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nik9000/5970277 to your computer and use it in GitHub Desktop.
Save nik9000/5970277 to your computer and use it in GitHub Desktop.
Curl recreation of issue causing index to be un-openable
curl -XDELETE "http://localhost:9200/test_close?pretty=true"
# Create an index with a bunch of shards which should take a while
curl -XPOST "http://localhost:9200/test_close?pretty=true" -d '{
"settings": {
"number_of_shards": 1024,
"number_of_replicas": 3
}
}'
# Close the index real fast
curl -XPOST "http://localhost:9200/test_close/_close?pretty=true"
# Wait a bit and open it
sleep 2
curl -XPOST "http://localhost:9200/test_close/_open?pretty=true"
watch -d curl -s -XGET "http://localhost:9200/_cluster/health?pretty=true"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment