我正在尝试禁用TF/IDF,使用constant_score进行多个匹配查询。
GET cities/_search
{
"query": {
"bool": {
"must": [
{
"constant_score": {
"query": {
"multi_match": {
"query": "new york",
"fields": [
"city",
"village"
]
}
}
}
}
]
}
}
}
"reason": "[constant_score] query does not support [query]".
我也尝试过不使用查询包装器
GET cities/_search
{
"query": {
"bool": {
"must": [
{
"constant_score": {
"multi_match": {
"query": "new york",
"fields": [
"city",
"village"
]
}
}
}
]
}
}
}
但我得到了以下错误:
"[constant_score] query does not support [multi_match]".
是否有一个解决方法可以一起使用它们?