Skip to content

Instantly share code, notes, and snippets.

@clintongormley
Created June 28, 2013 11:13
Show Gist options
  • Save clintongormley/5883984 to your computer and use it in GitHub Desktop.
Save clintongormley/5883984 to your computer and use it in GitHub Desktop.
curl -XDELETE 'localhost:9200/test%2A?pretty=1'
curl -XPUT 'localhost:9200/test_1?pretty=1' -d '
{
"mappings" : {
"test" : {
"_parent" : {
"type" : "foo"
}
}
}
}
'
curl -XGET 'localhost:9200/_cluster/health?wait_for_status=yellow&pretty=1'
curl -XPUT 'localhost:9200/test_1/test/1?parent=3&pretty=1' -d '
{
"foo" : "bar"
}
'
curl -XDELETE 'localhost:9200/test_1/test/1?parent=2&pretty=1'
# {
# "ok" : true,
# "_index" : "test_1",
# "_id" : "1",
# "_type" : "test",
# "found" : true,
# "_version" : 2
# }
curl -XDELETE 'localhost:9200/test_1/test/1?parent=3&pretty=1'
# {
# "ok" : true,
# "_index" : "test_1",
# "_id" : "1",
# "_type" : "test",
# "found" : false,
# "_version" : 0
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment