es计算评分

发布时间 2023-03-31 18:42:44作者: parkdifferent

 

评分计算

bool 查询会为每个文档计算相关度评分 _score ,再将所有匹配的 must 和 should 语句的分数 _score 求和,最后除以 must 和 should 语句的总数。

must_not 语句不会影响评分;它的作用只是将不相关的文档排除。

 

https://www.elastic.co/guide/cn/elasticsearch/guide/current/bool-query.html#_%E8%AF%84%E5%88%86%E8%AE%A1%E7%AE%97

 

Elasticsearch 之 Filter 与 Query 有啥不同?
https://cloud.tencent.com/developer/article/1790450