搜索中心--文档库(技术领域搜索)
This commit is contained in:
+11
-5
@@ -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<>();
|
||||
|
||||
Reference in New Issue
Block a user