Elasticsearch如何计算完成建议中的_score?为什么我的分数不等于体重?

时间:2019-05-16 16:29:12

标签: elasticsearch autocomplete search-suggestion

根据Elasticsearch文档https://www.elastic.co/guide/en/elasticsearch/reference/6.7/search-suggesters-completion.html,分数是权重吗?

我创建一个这样的示例,权重为5

POST music2/name
{
    "suggest" : {
        "input": [ "百频", "bp","baipin" ],
        "weight" : 5
    }
}

但是当我查询时,会得到如下结果:

   "suggest": {
      "my-suggest": [
         {
            "text": "百度视频",
            "offset": 0,
            "length": 4,
            "options": [
               {
                  "text": "百度视频",
                  "score": 65
               }
            ]
         }
      ]
   }

分数是65,如何计算?为什么不相等的体重?

非常感谢!

0 个答案:

没有答案