這是我的DSL:如何搜索產品與elasticsearch
{
"query": {
"function_score": {
"query": {
"multi_match": {
"query": "testa",
"analyzer":"standard",
"type": "best_fields",
"fields": [ "name^5", "content^1" ]
}
},
"field_value_factor": {
"field": "popular",
"modifier": "log1p",
"factor": 0.1
},
"boost_mode": "sum",
"max_boost": 1.5
}
}
}
當我搜索像「種皮」這樣的關鍵字,結果只包含關鍵字「種皮」,我應該怎麼做才能使結果中包含關鍵字'testa'和'test'或'tes'? 謝謝。