0

我通过将标记过滤器指定为标准中使用的小写和分析器来创建索引。使用的 Elastic Search 版本是 7。

"filter": [
      "lowercase",
      "autocomplete_filter"
    ]

但是当我搜索文本时,比如说 Summer,它没有给出任何结果,但是当我输入 summer 时,它会获取文档。

据我所知,文档将以我们提供的方式存储。该标准只会使 Elastic 搜索以小写标记。

但是为什么只搜索小写单词而不搜索大写或大写和小写的组合。

下面是映射和查询。

{"mappings":{"properties":,"title":{"type":"text"}


"bool" : {
"must" : [
  {
    "terms" : {
      "title" : [
        "SUMMer"
      ],
      "boost" : 1.0
    }
  }
],
"adjust_pure_negative" : true,
"boost" : 1.0}

Document 中 title 的值与 summer 相关

搜索到的项目是SUMMer。

4

0 回答 0