Showing
3 changed files
with
7 additions
and
4 deletions
@@ -189,6 +189,7 @@ public class IndexController implements ApplicationEventPublisherAware { | @@ -189,6 +189,7 @@ public class IndexController implements ApplicationEventPublisherAware { | ||
189 | } | 189 | } |
190 | indexRebuildJob.rebuildTblProductIndex(); | 190 | indexRebuildJob.rebuildTblProductIndex(); |
191 | indexRebuildJob.execute(); | 191 | indexRebuildJob.execute(); |
192 | + suggestionDiscoveryJob.execute(); | ||
192 | suggestionCounterJob.execute(); | 193 | suggestionCounterJob.execute(); |
193 | indexRebuildJob.rebuildSuggestIndex(); | 194 | indexRebuildJob.rebuildSuggestIndex(); |
194 | return getResultMap(200, "rebuildAll success"); | 195 | return getResultMap(200, "rebuildAll success"); |
@@ -60,7 +60,7 @@ public abstract class AbstractSuggestionCounter implements ApplicationEventPubli | @@ -60,7 +60,7 @@ public abstract class AbstractSuggestionCounter implements ApplicationEventPubli | ||
60 | } | 60 | } |
61 | 61 | ||
62 | Map<String, Integer> filterMap = filter(pageNo, countMap); | 62 | Map<String, Integer> filterMap = filter(pageNo, countMap); |
63 | - logger.info("[{} business][pageNo={}][fetchWordSize={}][countMapSize={}][countMapSize={}]", flowName(), pageNo, fetchSize, countMapSize, filterMap.size()); | 63 | + logger.info("[{} business][pageNo={}][fetchWordSize={}][countMapSize={}][filterMapSize={}]", flowName(), pageNo, fetchSize, countMapSize, filterMap.size()); |
64 | logger.trace("[{} business][pageNo={}][keywordMap={}][countMap={}][filterMap={}]", flowName(), pageNo, keywordMap, countMap, filterMap); | 64 | logger.trace("[{} business][pageNo={}][keywordMap={}][countMap={}][filterMap={}]", flowName(), pageNo, keywordMap, countMap, filterMap); |
65 | return persistence(keywordMap, filterMap); | 65 | return persistence(keywordMap, filterMap); |
66 | } | 66 | } |
@@ -57,9 +57,11 @@ public class SuggestionKeywordCounter extends AbstractSuggestionCounter { | @@ -57,9 +57,11 @@ public class SuggestionKeywordCounter extends AbstractSuggestionCounter { | ||
57 | Map<String, Integer> resultMap = super.filter(pageNo, countMap); | 57 | Map<String, Integer> resultMap = super.filter(pageNo, countMap); |
58 | 58 | ||
59 | // 检查一些不友好的推荐词 输出到日志中 | 59 | // 检查一些不友好的推荐词 输出到日志中 |
60 | - List<String> notNormalWords = resultMap.keySet().stream().filter(keyword -> notNormalKeyword(keyword)).collect(Collectors.toList()); | ||
61 | - if (notNormalWords != null && !notNormalWords.isEmpty()) { | ||
62 | - logger.warn("found not normal words: {}", notNormalWords.stream().map(item -> "'" + item + "'").collect(Collectors.joining(","))); | 60 | + if (logger.isInfoEnabled()) { |
61 | + List<String> notNormalWords = resultMap.keySet().stream().filter(keyword -> notNormalKeyword(keyword)).collect(Collectors.toList()); | ||
62 | + if (notNormalWords != null && !notNormalWords.isEmpty()) { | ||
63 | + logger.info("[{} check][pageNo={}]found not normal words: {}", flowName(), pageNo, notNormalWords.stream().map(item -> "'" + item + "'").collect(Collectors.joining(","))); | ||
64 | + } | ||
63 | } | 65 | } |
64 | 66 | ||
65 | return resultMap; | 67 | return resultMap; |
-
Please register or login to post a comment