...
The qpl_query will be an object of type Operator, which will contain all the operators of the query. At this point the qpl query is truly engine agnostic, and it needs a translator to be an engine query
Warning |
---|
We do not recommend the use of a custom grammar. This functionality exist for grammar, fixes, enhancements or additions to projects which can not wait for an official release. A wrong grammar could break the entire functionality. That said, you require to modify the existen grammar, or require a new one, please contact the development team. |
You can use your own grammar to parse a query, with either a well made lark file, or a raw string
Code Block | ||||
---|---|---|---|---|
| ||||
options = QPLOptions(fields='content', grammar='/grammar/mygrammar.lark') |
For more detail on how to build a grammar please check Grammar Composition from the Lark documentation