Authored by Gino Zhang

避免返回queryword自己

... ... @@ -259,6 +259,7 @@ public class SuggestServiceImpl implements ISuggestService, ApplicationEventPubl
if (StringUtils.isNotEmpty(dest)) {
int count = 0;
for (String keyword : dest.split(",")) {
if(!queryWord.equalsIgnoreCase(keyword)) {
count++;
resultTerms.add(keyword);
// 最多返回五个推荐词
... ... @@ -268,6 +269,7 @@ public class SuggestServiceImpl implements ISuggestService, ApplicationEventPubl
}
}
}
}
// 6) 加入缓存
suggestResult = new JSONObject();
... ...