Query Elastic Search via the query string URL (from a mobile client)

We have a use - case where we have a backend service and mobile clients of that service. Think of something like the Uber app.

The requirement is that our mobile clients should be able to search entities based on multiple filters, like age, height, weight, name, ... stuff like that. Obviously, the request would go from the client to our service, and then the service would need to request the Elastic Search engine to fetch query results.

Now, the question is in which format should the mobile client query our service. Obviously, the query would need to be something that would get easily mapped into the Elastic Search query. We were thinking to send a direct query string from the device to our service, like /driver,passenger/_search?q=firstName:Abi* AND car:Ford AND miles:<=5000. The service would then only forward the query string to the Elastic Search, by doing something like: QueryBuilders.queryStringQuery(queryFromTheDevice).

The question is - is that a safe approach? If the ES changes their query language, our queries would immediately fail. Is there a chance something like that would happen? Is it a better idea to use our own query language and only map it to ES query using the API?

Could we please get any direction advise on this?

It's safe IMHO.
I don't think it ever changed.

But even if elasticsearch changes anything, as you have your server in the middle you can always rewrite the query if needed (worse case).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.