搜索--权重

This commit is contained in:
zhn
2022-04-12 15:58:59 +08:00
parent 20c5f21075
commit fd5308db13
@@ -390,6 +390,14 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
Map<String, Object> queryMap = new HashMap<>();
Map<String, Object> map2 = new HashMap<>();
Map<String, Object> map3 = new HashMap<>();
// if("title".equals(field) || "serial_number".equals(field)){
// map3.put("query",selectValue);
// map3.put("slop",1);
// map3.put("boost",10f);
// }else{
// map3.put("query",selectValue);
// map3.put("slop",1);
// }
map3.put("query",selectValue);
map3.put("slop",1);
map2.put(field, map3);