0
我儘量簡短。此搜索不適用multi_match
中的搜索關鍵字。我插入的任何搜索文字,我總是得到相同的結果。Elasticsearch:multi_match對過濾器沒有影響
如果我刪除filtered/filter
,它會給我一個合適的搜索。爲什麼?
GET /catalog/products/_search
{
"from":0,
"size":150,
"query":{
"filtered":{
"query":{
"multi_match":{
"query":"text to search",
"fields":[
"title^5",
"description"
]
},
"filter":{
"and":[
{
"term":{
"category": 2
}
},
{
"not":{
"term":{
"subCategory": 3
}
}
}
]
}
}
}
}
}
太好了!沒有你的幫助,我會失去視力來找到問題! – Ivan