Authored by Gino Zhang

黑名单需要转换大小写处理

@@ -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());