Showing
1 changed file
with
1 additions
and
1 deletions
@@ -85,7 +85,7 @@ public class KeywordCrawlerFlow implements RetryBusinessFlow { | @@ -85,7 +85,7 @@ public class KeywordCrawlerFlow implements RetryBusinessFlow { | ||
85 | 85 | ||
86 | Set<String> invalidKeywords = yhNoSyncSetOperations.members(RedisKeys.YOHO_SEARCH_KEYWORDS_INVALID); | 86 | Set<String> invalidKeywords = yhNoSyncSetOperations.members(RedisKeys.YOHO_SEARCH_KEYWORDS_INVALID); |
87 | if (CollectionUtils.isNotEmpty(invalidKeywords)) { | 87 | if (CollectionUtils.isNotEmpty(invalidKeywords)) { |
88 | - keywordSet.remove(invalidKeywords); | 88 | + keywordSet = keywordSet.stream().filter(keyword -> !invalidKeywords.contains(keyword.toLowerCase().trim())).collect(Collectors.toSet()); |
89 | } | 89 | } |
90 | 90 | ||
91 | logger.info("[func=KeywordCrawlerFlow.init][keywordSetSizeRemovedInvalid={}]", keywordSet.size()); | 91 | logger.info("[func=KeywordCrawlerFlow.init][keywordSetSizeRemovedInvalid={}]", keywordSet.size()); |
-
Please register or login to post a comment