Skip to content

Instantly share code, notes, and snippets.

@emas80
Last active December 10, 2015 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emas80/4505957 to your computer and use it in GitHub Desktop.
Save emas80/4505957 to your computer and use it in GitHub Desktop.
It seems that in Elastic Search TEST is a reserved keyword
{"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"}}]}}
@emas80
Copy link
Author

emas80 commented Jan 10, 2013

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.

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