gpt4 book ai didi

elasticsearch - Elasticsearch:分数得分,具有multi_match(启用模糊性)并在同一查询中过滤,仅基于multi_match部分

转载 作者:行者123 更新时间:2023-12-03 00:07:39 24 4
gpt4 key购买 nike

考虑下面的Elasticsearch查询,我想知道是否有可能以百分比(0-100%)来表示分数,或者我如何以这种方式计算分数,并且仅基于查询的multi_match部分进行计算,其中模糊性已启用。

因此,我希望分数忽略它的过滤器部分。

提前致谢。

{
"index": "myindex",
"type": "mytype",
"body": {
"_source": [
"author_mt",
...
"title_t",
],
"from": 0,
"size": 100,
"query": {
"bool": {
"must": {
"multi_match": {
"query": "test",
"fields": [
"title*"
],
"fuzziness": "AUTO"
}
},
"filter": {
"bool": {
"must": [
{
"term": {
"genre_t_s": 'test'
}
}
]
}
}
}
}
}
}

最佳答案

flex 搜索得分基于TF / IDF算法,因此得分可以大于1(或100%)。检查以下链接的相关性:

https://www.elastic.co/guide/en/elasticsearch/guide/current/relevance-intro.html

关于elasticsearch - Elasticsearch:分数得分,具有multi_match(启用模糊性)并在同一查询中过滤,仅基于multi_match部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43794284/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com