-
-
Save augustl/4352453 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
{"ok":true,"acknowledged":true} | |
{"ok":true,"_index":"rctest","_type":"attendants","_id":"123","_version":1} | |
{"ok":true,"_index":"rctest","_type":"attendants","_id":"321","_version":1} | |
*** REFRESH | |
{"ok":true,"_shards":{"total":10,"successful":5,"failed":0}} | |
*** All documents | |
{"took":2,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":2,"max_score":1.0,"hits":[{"_index":"rctest","_type":"attendants","_id":"321","_score":1.0, "_source" : {"is_cool":false}},{"_index":"rctest","_type":"attendants","_id":"123","_score":1.0, "_source" : {"is_cool":true}}]}} | |
*** Result of query A | |
{"took":2,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}} | |
*** Result of Query A as query params | |
{"took":2,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}} | |
*** REFRESH | |
{"ok":true,"_shards":{"total":10,"successful":5,"failed":0}} | |
*** All documents | |
{"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":2,"max_score":1.0,"hits":[{"_index":"rctest","_type":"attendants","_id":"321","_score":1.0, "_source" : {"is_cool":false}},{"_index":"rctest","_type":"attendants","_id":"123","_score":1.0, "_source" : {"is_cool":true}}]}} | |
*** Result of query B | |
{"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":0.30685282,"hits":[{"_index":"rctest","_type":"attendants","_id":"321","_score":0.30685282, "_source" : {"is_cool":false}}]}} | |
*** Result of Query B as query params | |
{"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":0.30685282,"hits":[{"_index":"rctest","_type":"attendants","_id":"321","_score":0.30685282, "_source" : {"is_cool":false}}]}} |
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 http://localhost:9200/rctest | |
echo | |
curl -XPOST http://localhost:9200/rctest/attendants/123 -d '{"is_cool":true}' | |
echo | |
curl -XPOST http://localhost:9200/rctest/attendants/321 -d '{"is_cool":false}' | |
echo | |
echo "*** REFRESH" | |
curl -XPOST http://localhost:9200/rctest/_refresh | |
echo | |
echo "*** All documents" | |
curl -XGET http://localhost:9200/rctest/attendants/_search | |
echo | |
echo "*** Result of query A" | |
curl -XGET http://localhost:9200/rctest/attendants/_search -d '{"query":{"term":{"is_cool":true}}}' | |
echo | |
echo "*** Result of Query A as query params" | |
curl -XGET "http://localhost:9200/rctest/_search?q=is_cool:true" | |
echo | |
echo "*** REFRESH" | |
curl -XPOST http://localhost:9200/rctest/_refresh | |
echo | |
echo "*** All documents" | |
curl -XGET http://localhost:9200/rctest/attendants/_search | |
echo | |
echo "*** Result of query B" | |
curl -XGET http://localhost:9200/rctest/attendants/_search -d '{"query":{"term":{"is_cool":false}}}' | |
echo | |
echo "*** Result of Query B as query params" | |
curl -XGET "http://localhost:9200/rctest/_search?q=is_cool:false" | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment