loopbackio / loopback-connector-elastic-search

Strongloop Loopback connector for Elasticsearch
MIT License
78 stars 56 forks source link

Combining geo near queries with multi_match #119

Open rhlr opened 5 years ago

rhlr commented 5 years ago

I am trying to combine geo near queries with multi match queries using the below query:

{ "where": { "and": [{ "geo": { "near": { "lat": 30.78, "lng": 76.69 } } }, { "native": { "query": { "multi_match": { "query": "python", "fields": ["title", "tags", "description"], "type": "most_fields" } } } }] } }

But all I am getting is empty reponse. Both of the query works fine individually. Also, if I combine other queries with multi_match then multi_match query has no effect on the result. Only the second query gets executed. Can anyone tell me if this the right way to combine these queries ?