搜索中心-法规月报-bug58587,58589
This commit is contained in:
+6
-15
@@ -64,12 +64,8 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
String selectValueTwo = searchVO.getSelectValueTwo();
|
||||
//1. 需要查询的字段
|
||||
List<String> fieldList = new ArrayList<>();
|
||||
fieldList.add("title");//权重5
|
||||
fieldList.add("file_text");//权重4
|
||||
fieldList.add("content");//权重3
|
||||
fieldList.add("file_name"); //权重2
|
||||
fieldList.add("module_type");
|
||||
fieldList.add("id");
|
||||
fieldList.add("title");//权重2
|
||||
fieldList.add("content");//权重1
|
||||
fieldList.add("flag");
|
||||
|
||||
JSONArray queryMapJson = new JSONArray();
|
||||
@@ -87,12 +83,8 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
Map<String, Object> map4 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}else if("file_text".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}
|
||||
|
||||
map3.put("query",selectValue);
|
||||
@@ -119,12 +111,8 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
Map<String, Object> map3 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}else if("file_text".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}
|
||||
|
||||
//特殊处理编号字段
|
||||
@@ -190,8 +178,11 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
} else {
|
||||
jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, null);
|
||||
}
|
||||
|
||||
JSONArray jsonArraySort = new JSONArray();
|
||||
jsonArraySort.add(querySort);
|
||||
if (SEARCH_FLAG.equals(selectValue) && StringUtils.isEmpty(selectValueTwo)) {
|
||||
jsonArraySort.add(querySort);
|
||||
}
|
||||
|
||||
//1. 条件,分页
|
||||
JSONObject queryObject = jeroElasticsearchTemplate.buildQuery(null,
|
||||
|
||||
Reference in New Issue
Block a user