搜索中心--文档库(技术领域搜索)

This commit is contained in:
zhn
2022-09-29 11:00:24 +08:00
parent c2b79bf730
commit 6814f4bf70
@@ -350,11 +350,17 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
String key = entry.getKey();
String value = (String) entry.getValue();
if("technology_territory".equals(key) && ObjectUtils.isNotEmpty(value)){
Map<String, Object> queryMapNew = new HashMap<>();
Map<String, Object> queryMapTempNew = new HashMap<>();
queryMapTempNew.put(key, "*"+value.replaceAll(",","*")+"*");
queryMapNew.put("wildcard", queryMapTempNew);
must.add(queryMapNew);
JSONArray should = new JSONArray();
List<Map<String,Object>> mapList = new ArrayList<>();
for (String s : value.split(",")) {
Map<String,Object> map = new HashMap();
map.put(key,"*"+s+"*");
Map<String,Object> map1 = new HashMap<>();
map1.put("wildcard",map);
should.add(map1);
}
must.add(should);
}else{
Map<String, Object> map = new HashMap<>();
Map<String, Object> queryMap = new HashMap<>();