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