试试搜索一下吧

fuzziness AUTO参数疑问

Elasticsearch | 作者 caryliang | 发布于2023年08月16日 | 阅读数:633

官网解释:Generates an edit distance based on the length of the term. Low and high distance arguments may be optionally provided AUTO:[low],[high]. If not specified, the default values are 3 and 6, equivalent to AUTO:3,6 that make for lengths:

0..2
Must match exactly
3..5
One edit allowed
>5
Two edits allowed
但是,我配置{"value":"jenno_o","fuzziness":"AUTO:4,7"}为什么能匹配出
      {
        ......
        "_source" : {
          "name" : "JennH2o",
        }
      }
按理7个字符,设置允许编辑距离是1, 但是结果看起来编辑距离是2。且我设置AUTO:4,8就符合预期,难道最后是闭区间官方文档写错了?
来个人打醒下我!
已邀请:

Charele - Cisco4321

赞同来自:

:你要查的长度是7,"AUTO:4,7",给的距离是2,所以okay
 
AUTO:4,8就是1,就查不到了

要回复问题请先登录注册