You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: