Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+22
-7
@@ -86,10 +86,18 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
}else if("content".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}
|
||||
// 标题字段 通配符模糊匹配
|
||||
if (field.equals("title")){
|
||||
// map2放最内层
|
||||
map2.put(field, "*" + selectValue + "*");
|
||||
|
||||
map3.put("query",selectValue);
|
||||
map2.put(field, map3);
|
||||
map4.put("match",map2);
|
||||
// map4放query
|
||||
map4.put("wildcard",map2);
|
||||
} else {
|
||||
map3.put("query", selectValue);
|
||||
map2.put(field, map3);
|
||||
map4.put("match", map2);
|
||||
}
|
||||
queryMapJson.add(map4);
|
||||
|
||||
//高亮
|
||||
@@ -115,11 +123,18 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
map3.put("boost",0.01);
|
||||
}
|
||||
|
||||
//特殊处理编号字段
|
||||
map3.put("query",selectValueTwo);
|
||||
// 标题字段 通配符模糊匹配
|
||||
if (field.equals("title")){
|
||||
// map2放最内层
|
||||
map2.put(field, "*" + selectValueTwo + "*");
|
||||
// map4放query
|
||||
queryMap.put("wildcard",map2);
|
||||
} else {
|
||||
map3.put("query", selectValueTwo);
|
||||
// map3.put("minimum_should_match",2);
|
||||
map2.put(field, map3);
|
||||
queryMap.put("match", map2);
|
||||
map2.put(field, map3);
|
||||
queryMap.put("match", map2);
|
||||
}
|
||||
|
||||
queryMapJsonTwo.add(queryMap);
|
||||
//高亮
|
||||
|
||||
Reference in New Issue
Block a user