Skip to content

Instantly share code, notes, and snippets.

@kimchy
Created October 18, 2011 18:15
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 kimchy/1296201 to your computer and use it in GitHub Desktop.
Save kimchy/1296201 to your computer and use it in GitHub Desktop.
# Start two nodes (run bin/elasticsearch -f twice) and run:
curl -XPOST localhost:9200/test -d '{
"settings" : {
"number_of_shards" : 3
}
}'
# Run cluster state, under routing_nodes element, you will see the shards allocated on each node
curl localhost:9200/_cluster/state?pretty=1
# Start another node (another bin/elasticsearch -f)
# Run cluster state, under routing_nodes element, you will see the shards allocated on each node
curl localhost:9200/_cluster/state?pretty=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment