...
|
...
|
@@ -259,11 +259,13 @@ public class SuggestServiceImpl implements ISuggestService, ApplicationEventPubl |
|
|
if (StringUtils.isNotEmpty(dest)) {
|
|
|
int count = 0;
|
|
|
for (String keyword : dest.split(",")) {
|
|
|
count++;
|
|
|
resultTerms.add(keyword);
|
|
|
// 最多返回五个推荐词
|
|
|
if (count == 5) {
|
|
|
break;
|
|
|
if(!queryWord.equalsIgnoreCase(keyword)) {
|
|
|
count++;
|
|
|
resultTerms.add(keyword);
|
|
|
// 最多返回五个推荐词
|
|
|
if (count == 5) {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
...
|
...
|
|