搜索中心--文档库(技术领域搜索)
This commit is contained in:
+11
-5
@@ -350,11 +350,17 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
|||||||
String key = entry.getKey();
|
String key = entry.getKey();
|
||||||
String value = (String) entry.getValue();
|
String value = (String) entry.getValue();
|
||||||
if("technology_territory".equals(key) && ObjectUtils.isNotEmpty(value)){
|
if("technology_territory".equals(key) && ObjectUtils.isNotEmpty(value)){
|
||||||
Map<String, Object> queryMapNew = new HashMap<>();
|
JSONArray should = new JSONArray();
|
||||||
Map<String, Object> queryMapTempNew = new HashMap<>();
|
|
||||||
queryMapTempNew.put(key, "*"+value.replaceAll(",","*")+"*");
|
List<Map<String,Object>> mapList = new ArrayList<>();
|
||||||
queryMapNew.put("wildcard", queryMapTempNew);
|
for (String s : value.split(",")) {
|
||||||
must.add(queryMapNew);
|
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{
|
}else{
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
Map<String, Object> queryMap = new HashMap<>();
|
Map<String, Object> queryMap = new HashMap<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user