搜索中心

This commit is contained in:
zhn
2023-10-27 19:53:45 +08:00
parent 6996a30c9a
commit 088c95bfc2
@@ -100,6 +100,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
}
//删除英文标题
mapList.remove(index);
for (Map<String, Object> map : mapList) {
if("title".equals(map.get("db_field_name"))
&& CutEnum.EN.getValue().equals(cut)){
map.put("db_field_name","title_en");
}
}
//添加正文
Map<String, Object> map = new HashMap<>();
if(CutEnum.CN.getValue().equals(cut)){
@@ -229,7 +236,11 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
}
}else{
if(ObjectUtils.isNotEmpty(((Map<String, Object>) map.get("mapOne")).get("serial_number"))
|| ObjectUtils.isNotEmpty(((Map<String, Object>) map.get("mapTwo")).get("serial_number"))){
|| ObjectUtils.isNotEmpty(((Map<String, Object>) map.get("mapTwo")).get("serial_number"))
|| ObjectUtils.isNotEmpty(((Map<String, Object>) map.get("mapOne")).get("title"))
|| ObjectUtils.isNotEmpty(((Map<String, Object>) map.get("mapTwo")).get("title"))
|| ObjectUtils.isNotEmpty(((Map<String, Object>) map.get("mapOne")).get("title_en"))
|| ObjectUtils.isNotEmpty(((Map<String, Object>) map.get("mapTwo")).get("title_en"))){
Map<String,Object> score = new HashMap<>();
score.put("order","desc");
mapSortTemp.put("_score",score);