改为模糊查询,原来的模糊词组查询必需整个单词录入查询
This commit is contained in:
+1
-1
@@ -40,7 +40,7 @@ public class SlowQueryLogController extends LogController<SlowQueryLog> {
|
|||||||
String searchValue = (String) params.get("searchValue");
|
String searchValue = (String) params.get("searchValue");
|
||||||
if (StrUtil.isNotEmpty(searchKey) && StrUtil.isNotEmpty(searchValue)) {
|
if (StrUtil.isNotEmpty(searchKey) && StrUtil.isNotEmpty(searchValue)) {
|
||||||
// 模糊查询
|
// 模糊查询
|
||||||
builder.must(QueryBuilders.matchPhraseQuery(ES_PARAM_QUERY, searchValue));
|
builder.must(QueryBuilders.matchQuery(ES_PARAM_QUERY, searchValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.getPage(params, builder, logDao);
|
return super.getPage(params, builder, logDao);
|
||||||
|
|||||||
+1
-1
@@ -45,7 +45,7 @@ public class SysLogController extends LogController<SysLog> {
|
|||||||
searchValue = searchValue.toUpperCase();
|
searchValue = searchValue.toUpperCase();
|
||||||
}
|
}
|
||||||
// 模糊查询
|
// 模糊查询
|
||||||
builder.must(QueryBuilders.matchPhraseQuery(searchKey, searchValue));
|
builder.must(QueryBuilders.matchQuery(searchKey, searchValue));
|
||||||
}
|
}
|
||||||
return super.getPage(params, builder, logDao);
|
return super.getPage(params, builder, logDao);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user