Authored by Gino Zhang

搜索提示词增加拼写检查

... ... @@ -273,7 +273,7 @@ public class SuggestServiceImpl implements ISuggestService, ApplicationEventPubl
}
}
public JSONObject suggestTipsBySuggestIndex(Map<String, String> paramMap, boolean hasChangedKeyword) {
public JSONObject suggestTipsBySuggestIndex(final Map<String, String> paramMap, boolean hasChangedKeyword) {
String queryWord = paramMap.get(SearchRequestParams.PARAM_SEARCH_KEYWORD);
long begin = System.currentTimeMillis();
logger.info("[func=suggestTipsBySuggestIndex][query={}][begin={}]", queryWord, begin);
... ... @@ -357,7 +357,7 @@ public class SuggestServiceImpl implements ISuggestService, ApplicationEventPubl
Map<String, String> newParamMap = new HashMap<>(paramMap.size());
newParamMap.putAll(paramMap);
newParamMap.put(SearchRequestParams.PARAM_SEARCH_KEYWORD, correnctSpellingKeyword);
JSONObject correntSpellingSuggestResult = suggestTipsBySuggestIndex(paramMap, true);
JSONObject correntSpellingSuggestResult = suggestTipsBySuggestIndex(newParamMap, true);
correntSpellingSuggestResultTerms = correntSpellingSuggestResult != null ? (List<String>) correntSpellingSuggestResult.get("terms_suggestion") : null;
}
... ...