gpt4 book ai didi

elasticsearch multi_match 与应该

转载 作者:行者123 更新时间:2023-11-29 02:50:14 24 4
gpt4 key购买 nike

谁能告诉我这两者的区别

"query": {
"bool": {
"should": [
{ "match": {"title": keyword} },
{ "match": {"description": keyword} }
]
}

"query": {
"multi_match": {
"query": keyword,
"fields": [ "title", "description" ]
}
}

以上二选一是否有性能转向?

最佳答案

这取决于 type parameter您的 multi_match。在您的示例中,由于您没有指定类型,best_fields用来。这利用了 Dis Max Query基本上

uses the _score from the best field

另一方面,你的例子应该

combines the _score from each field.

它等同于类型为 most_fieldsmulti_match

关于elasticsearch multi_match 与应该,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32839538/

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