Skip to content

Instantly share code, notes, and snippets.

@jprante
Created March 5, 2013 23:56
Show Gist options
  • Save jprante/5095527 to your computer and use it in GitHub Desktop.
Save jprante/5095527 to your computer and use it in GitHub Desktop.
curl -XDELETE 'localhost:9200/test'
curl -XPUT 'localhost:9200/test/doc/1' -d '
{
"sentence" : "Hi!",
"value" : 1
}
'
curl -XPUT 'localhost:9200/test/doc/2' -d '
{
"sentence" : "Hi!",
"value" : 2
}
'
curl 'localhost:9200/test/_refresh'
curl -XPOST 'localhost:9200/test/_search' -d '
{
"query" : {
"filtered" : {
"query" : { "text" : { "sentence" : "Hi!" } },
"filter" : { "term" : { "value" : 1 } }
}
}
}
'
@darshantejani007
Copy link

Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment