搜索中心-法规月报-bug58552,58591
This commit is contained in:
+22
-7
@@ -86,10 +86,18 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
|||||||
}else if("content".equals(field)){
|
}else if("content".equals(field)){
|
||||||
map3.put("boost",0.01);
|
map3.put("boost",0.01);
|
||||||
}
|
}
|
||||||
|
// 标题字段 通配符模糊匹配
|
||||||
|
if (field.equals("title")){
|
||||||
|
// map2放最内层
|
||||||
|
map2.put(field, "*" + selectValue + "*");
|
||||||
|
|
||||||
map3.put("query",selectValue);
|
// map4放query
|
||||||
map2.put(field, map3);
|
map4.put("wildcard",map2);
|
||||||
map4.put("match",map2);
|
} else {
|
||||||
|
map3.put("query", selectValue);
|
||||||
|
map2.put(field, map3);
|
||||||
|
map4.put("match", map2);
|
||||||
|
}
|
||||||
queryMapJson.add(map4);
|
queryMapJson.add(map4);
|
||||||
|
|
||||||
//高亮
|
//高亮
|
||||||
@@ -115,11 +123,18 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
|||||||
map3.put("boost",0.01);
|
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);
|
// map3.put("minimum_should_match",2);
|
||||||
map2.put(field, map3);
|
map2.put(field, map3);
|
||||||
queryMap.put("match", map2);
|
queryMap.put("match", map2);
|
||||||
|
}
|
||||||
|
|
||||||
queryMapJsonTwo.add(queryMap);
|
queryMapJsonTwo.add(queryMap);
|
||||||
//高亮
|
//高亮
|
||||||
|
|||||||
Reference in New Issue
Block a user