Created
March 5, 2013 23:56
-
-
Save jprante/5095527 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } } | |
} | |
} | |
} | |
' |
Thank you so much. Your introduction help me to create query with ruby gem "elasticsearch-rails".
Thank you!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you sir just saved the day! thankyou