搜索中心
This commit is contained in:
+24
@@ -363,6 +363,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
Matcher matcher = pattern.matcher(value);
|
||||
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add(value);
|
||||
while (matcher.find()) {
|
||||
String group = matcher.group();
|
||||
list.add(group);
|
||||
@@ -772,6 +773,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
Matcher matcher = pattern.matcher(selectValue);
|
||||
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add(selectValue);
|
||||
while (matcher.find()) {
|
||||
String group = matcher.group();
|
||||
list.add(group);
|
||||
@@ -795,6 +797,28 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
Map<String,Object> map2 = new HashMap<>();
|
||||
map2.put("match",map1);
|
||||
queryMapJson.add(map2);
|
||||
|
||||
// // wildcard模糊查询
|
||||
// //情况举例:用户只记得中间那段字
|
||||
// Map<String, Object> map24 = new HashMap<>();
|
||||
// Map<String, Object> map44 = new HashMap<>();
|
||||
// Map<String, Object> map55 = new HashMap<>();
|
||||
// map55.put("value","*" + selectValue + "*");
|
||||
// if("serial_number".equals(field)){
|
||||
// map55.put("boost",10);
|
||||
// }else if("title".equals(field)){
|
||||
// map55.put("boost",8);
|
||||
// }else if("file_text".equals(field)){
|
||||
// map55.put("boost",0.01);
|
||||
// }else if("content".equals(field)){
|
||||
// map55.put("boost",0.01);
|
||||
// }else if("file_name".equals(field)){
|
||||
// map55.put("boost",5);
|
||||
// }
|
||||
//
|
||||
// map24.put(field, map55);
|
||||
// map44.put("wildcard",map24);
|
||||
// queryMapJson.add(map44);
|
||||
}
|
||||
}
|
||||
// private void getQueryMapJsonFullText(JSONArray queryMapJson, String selectValue, String field) {
|
||||
|
||||
Reference in New Issue
Block a user