possible to construct queries from the raw ES string queries?
ababkin opened this issue · 2 comments
While this request may seem to go against the whole ethos of bloodhound
, my use case is begging for a fallback solution to the original ES string query syntax.
I've looked through the docs and prior issues, but was not able to quickly find the answer to this question.
Does anyone know whether it's possible ? (either submitting the raw ES queries through the bloodhound
or parse the raw ES queries into bloodhounds
query representations)
Does this help?
I expect there is probably some manner of query API because products like Kibana accept lucene-formatted query strings and pass them along to the server. Perhaps on the frontend, Kibana is converting those to JSON structures, I'm not sure.
Generally speaking though, if you find a sensible query string format, you could probably tailor a parser to your use case. uri-bytestring
provides a URI parser including parameter parsing. I'm not sure that something like this would make sense to maintain in this library though as it is an ES client and that sounds more like an operational utility. Maintaining a reasonably complete query parser sounds like a ton of work considering how complex the ES query API is, so I think that may be another point towards you coding exactly the subset you need for your own use case.
Thanks Michael. I'll try the query string out.