改为模糊查询,原来的模糊词组查询必需整个单词录入查询

This commit is contained in:
zlt
2019-01-24 16:03:47 +08:00
parent da0f07ae08
commit ba4417263b
2 changed files with 2 additions and 2 deletions
@@ -40,7 +40,7 @@ public class SlowQueryLogController extends LogController<SlowQueryLog> {
String searchValue = (String) params.get("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);
@@ -45,7 +45,7 @@ public class SysLogController extends LogController<SysLog> {
searchValue = searchValue.toUpperCase();
}
// 模糊查询
builder.must(QueryBuilders.matchPhraseQuery(searchKey, searchValue));
builder.must(QueryBuilders.matchQuery(searchKey, searchValue));
}
return super.getPage(params, builder, logDao);
}