...
|
...
|
@@ -271,7 +271,12 @@ public class SuggestServiceImpl implements ISuggestService, ApplicationEventPubl |
|
|
if (StringUtils.isNotEmpty(queryWord)) {
|
|
|
// 是否精确匹配
|
|
|
String accurateQuery = paramMap.get("accurate");
|
|
|
queryBuilder = "Y".equalsIgnoreCase(accurateQuery) ? QueryBuilders.matchQuery("standardKeyword", CharUtils.standardized(queryWord)) : QueryBuilders.matchQuery("keyword.keyword_ik", queryWord);
|
|
|
if ("Y".equalsIgnoreCase(accurateQuery)) {
|
|
|
queryBuilder = QueryBuilders.matchQuery("standardKeyword", CharUtils.standardized(queryWord));
|
|
|
} else {
|
|
|
queryBuilder = QueryBuilders.multiMatchQuery(queryWord.trim().toLowerCase(), "keyword", "keyword.keyword_lowercase",
|
|
|
"keyword.keyword_pinyin", "keyword.keyword_jianpin", "keyword.keyword_ik");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
searchParam.setQuery(queryBuilder);
|
...
|
...
|
|