对于给定的索引,我添加了如下文档:
[
{"expression": "tell me something about elasticsearch"},
{"expression": "this is a new feature for elasticsearch"},
{"expression": "tell me something about kibana"},
# ... and so on
]
现在,我想查询ElasticSearch,对于给定的输入表达式:"tell me something on elasticsearch"
。它必须给出:
{"expression": "tell me something about elasticsearch"},
{"expression": "tell me something about kibana"}
由于是这种情况,因此编辑距离w.r.t.在这种情况下,to words
(非字符级)较小。
我们可以在ElasticSearch上执行这样的查询吗?
1条答案
按热度按时间xesrikrc1#
根据我的理解,模糊性不允许输入短语/匹配短语。但让我为您分享一些用例,并尝试这些用例是否有帮助。
1.如果您要忽略丢失的单词执行搜索,请使用slopWITH MATCH_PASSION而不是FUZZY(这可能对您有效)