Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jprante
Created March 5, 2013 23:56
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 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 } }
}
}
}
'
@wojons
Copy link

wojons commented Apr 18, 2013

just wanted to say thank you was a super big help in solving something bugging me for weeks.

@nathamanath
Copy link

you sir just saved the day! thankyou

@datnt
Copy link

datnt commented Aug 29, 2014

Thank you so much. Your introduction help me to create query with ruby gem "elasticsearch-rails".

@darshantejani007
Copy link

Thank you!!

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