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:
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?