multi_field映射是正确的,但是搜索查询需要像这样更改:
{ "query": { "filtered": { "query": { "multi_match": { # changed from "query_string" "fields": ["name","name.exact"], "query": "Woods", # added this so the engine does a "sum of" instead of a "max of" # this is deprecated in the latest versions but works with 0.x "use_dis_max": false } } } }}
现在,结果将“精确”匹配考虑在内,并加总得分。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)