弹性搜索查询字符串的解析器

时间:2018-08-30 15:13:47

标签: python parsing elasticsearch grammar ebnf

我想知道是否有语法可以解析发送到Elastic Search query_string API的查询字符串?

参考文献在这里:https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax

我更喜欢EBNF。我目前使用Python是为了以防万一。

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

Whoosh(https://whoosh.readthedocs.io/en/latest/index.html)是带有Lucene查询解析器的纯Python搜索,您可以将其重新定位到自己的应用程序。我认为它在pyparsing(https://github.com/pyparsing/pyparsing/blob/master/examples/lucene_grammar.py)中利用了Lucene解析器示例

相关问题