Skip to content

Instantly share code, notes, and snippets.

@kimchy
Created December 29, 2010 10:24
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save kimchy/758398 to your computer and use it in GitHub Desktop.
Save kimchy/758398 to your computer and use it in GitHub Desktop.
curl -XPUT 'http://localhost:9200/dbparent/metadata/1' -d '{ "user" : "senthil", "Title" : "trying out Elastic Search"}'
curl -XPUT 'http://localhost:9200/dbparent/metadata/2' -d '{ "user" : "kumar", "Title" : "Elastic Search"}'
curl -XPUT 'http://localhost:9200/dbparent/child/_mapping' -d '{ "child" : { "_parent" : { "type" : "metadata" } }}'
curl -XPUT 'http://localhost:9200/dbparent/child/1?parent=1' -d '{ "tag" : "something"}'
curl -XGET 'http://localhost:9200/dbparent/_search' -d '{
"query" : {
"has_child" : {
"type" : "child",
"query" :{"term" : {"tag" : "something"} }
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment