搜索中心
This commit is contained in:
+12
-1
@@ -100,6 +100,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
|||||||
}
|
}
|
||||||
//删除英文标题
|
//删除英文标题
|
||||||
mapList.remove(index);
|
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<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
if(CutEnum.CN.getValue().equals(cut)){
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
@@ -229,7 +236,11 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
|||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if(ObjectUtils.isNotEmpty(((Map<String, Object>) map.get("mapOne")).get("serial_number"))
|
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<>();
|
Map<String,Object> score = new HashMap<>();
|
||||||
score.put("order","desc");
|
score.put("order","desc");
|
||||||
mapSortTemp.put("_score",score);
|
mapSortTemp.put("_score",score);
|
||||||
|
|||||||
Reference in New Issue
Block a user