我的搜索查询工作正常(我希望),但有时候我得到的结果太多了,得分分别为1.5,0.7,0.6 ......或0.1,0.001,0.001 ...... 是否可以阻止低相关性结果? 固定值不合适 - 因为它取决于最大_score(最相关结果的得分)。 它的工作就像“阻止所有结果,其中_score两倍于最大_score(得分最相关的结果)”
{
"query": {
"bool": {
"disable_coord": true,
"must": [
{ "match": {
"ObjectTypeSysName": {
"query": "participant"
}
}
},
{ "match": {
"_all": {
"query": "text-to-find",
"operator": "and",
"fuzziness": "AUTO",
"minimum_should_match": 1
}
}}
],
"should": [
{ "multi_match" : {
"query": "text-to-find",
"type": "best_fields",
"fields": [
"*NAME",
"ObjectData.EXTERNALID",
"ObjectData.contactList.VALUE",
"*SERIES",
"*NUMBER"
],
"operator": "or",
"boost": 2
}}
]
}
}
}