弹性搜索查询字符串的解析器
Parser for Elastic Search query strings
我想知道是否有可用的语法来解析发送到 Elastic Search 的查询字符串 query_string API?
我更喜欢 EBNF。我目前使用 Python 以防万一。
您可以在此处找到 Lucene 查询字符串查询解析器的 EBNF 语法:
https://github.com/apache/lucene-solr/blob/master/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj
嗖嗖 (https://whoosh.readthedocs.io/en/latest/index.html) is a pure-Python search with a Lucene query parser you could repurpose to your own app. I think it leveraged the Lucene parser example in pyparsing (https://github.com/pyparsing/pyparsing/blob/master/examples/lucene_grammar.py)
我想知道是否有可用的语法来解析发送到 Elastic Search 的查询字符串 query_string API?
我更喜欢 EBNF。我目前使用 Python 以防万一。
您可以在此处找到 Lucene 查询字符串查询解析器的 EBNF 语法: https://github.com/apache/lucene-solr/blob/master/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj
嗖嗖 (https://whoosh.readthedocs.io/en/latest/index.html) is a pure-Python search with a Lucene query parser you could repurpose to your own app. I think it leveraged the Lucene parser example in pyparsing (https://github.com/pyparsing/pyparsing/blob/master/examples/lucene_grammar.py)