I wonder if there is a grammar available which will be able to parse the query strings that are sent to Elastic Search query_string API?
The reference is here: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax
I'd prefer EBNF. I use Python currently just in case.
You can find the EBNF grammar of the Lucene query string query parser here: https://github.com/apache/lucene-solr/blob/master/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj
The relevant build steps are here: https://github.com/apache/lucene-solr/blob/1d85cd783863f75cea133fb9c452302214165a4d/lucene/queryparser/build.xml#L63-L79
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With