Last active
December 10, 2015 22:58
-
-
Save emas80/4505957 to your computer and use it in GitHub Desktop.
It seems that in Elastic Search TEST is a reserved keyword
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
{"query":{"filtered":{"query":{"bool":{"must":[{"field":{"pool":1}}],"must_not":[{"field":{"user_id":"ed559296-41a8-4890-83c1-af1ef3959a83"}}]}},"filter":{"bool":{"must":[{"term":{"series_id":"TEST"}}]}}}}} | |
{"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":2,"max_score":1.0,"hits":[{"_index":"ttt","_type":"series_subscriptions","_id":"ildella_bbb_series8","_score":1.0, "_source" : {"user_nickname":"ildella","user_id":"4a1f79e9-d231-455c-906b-fa650b9ca359","game":"bbb","series_id":"TEST","pool":1,"creation_date":"2013-01-10T22:15:06+00:00"}},{"_index":"ttt","_type":"series_subscriptions","_id":"abhishiv_bbb_series8","_score":1.0, "_source" : {"user_nickname":"abhishiv","user_id":"ed559296-41a8-4890-83c1-af1ef3959a83","game":"bbb","series_id":"TEST","pool":1,"creation_date":"2013-01-10T22:15:06+00:00"}}]}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This first line is the query, while the second one is the result of
"curl -XGET 'http://localhost:9200/ttt/series_subscriptions/_search'"
Nothing gets matched!
If I change the "series_id" to something else, both in the query and in the data on elastic search, for example "test",
it works like expected and it returns the correct result.