Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raw query search bug #109

Open
kesirog opened this issue Dec 12, 2022 · 0 comments
Open

Raw query search bug #109

kesirog opened this issue Dec 12, 2022 · 0 comments

Comments

@kesirog
Copy link

kesirog commented Dec 12, 2022

Followed the documentation for searching with raw query and it doesn't work, tried using same example with map and it did indeed work as intended. Ended up using raw query, but wrapped the json query into a poison decode.

Raw query (example from docs)
Elasticsearch.post(MyApp.ElasticsearchCluster, "/posts/_doc/_search", '{"query": {"match_all": {}}}')

Raw query (solved)
Wrap json query into Poison.decode!
Elasticsearch.post(MyApp.ElasticsearchCluster, "/posts/_doc/_search", Poison.decode!('{"query": {"match_all": {}}}'))

I hope this helps someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant