2
如何在彈性搜索5.2.0中將此過濾器添加到下面的查詢中。如何在Elasticsearch 5中添加過濾器到function_score查詢
我試圖將過濾器包裝在沒有運氣的過濾數組中。
過濾
"filter" : {
"term" : { "body.category" : 1}
}
查詢
{
"query": {
"function_score": {
"query": {
"multi_match": {
"operator": "and",
"query": "my search",
"fuzziness": 1,
"fields": [
"body.name^5",
"body.manufacturer^33",
"body.sections.name",
"body.sections.parent.name",
"body.sections.parent.parent.name"
]
}
},
"functions": [
{
"field_value_factor": {
"field": "body.rank"
}
}
],
"score_mode": "multiply"
}
}
}