suggest中索引增加parameterMake的内容
Showing
1 changed file
with
9 additions
and
3 deletions
@@ -18,7 +18,7 @@ import java.util.Set; | @@ -18,7 +18,7 @@ import java.util.Set; | ||
18 | @Component | 18 | @Component |
19 | public class ParameterMakeSuggestionDiscoverer extends AbstractSuggestionDiscoverer { | 19 | public class ParameterMakeSuggestionDiscoverer extends AbstractSuggestionDiscoverer { |
20 | 20 | ||
21 | - private static final List<String> IGNORE_LIST = Arrays.asList("其他"); | 21 | + private static final List<String> IGNORE_LIST = Arrays.asList("其他","正常"); |
22 | 22 | ||
23 | @Autowired | 23 | @Autowired |
24 | private ParameterMakeService parameterMakeService; | 24 | private ParameterMakeService parameterMakeService; |
@@ -35,8 +35,10 @@ public class ParameterMakeSuggestionDiscoverer extends AbstractSuggestionDiscove | @@ -35,8 +35,10 @@ public class ParameterMakeSuggestionDiscoverer extends AbstractSuggestionDiscove | ||
35 | List<ParameterMake> parameterMakeList = parameterMakeService.selectPageLists(start, batchSize); | 35 | List<ParameterMake> parameterMakeList = parameterMakeService.selectPageLists(start, batchSize); |
36 | if (CollectionUtils.isNotEmpty(parameterMakeList)) { | 36 | if (CollectionUtils.isNotEmpty(parameterMakeList)) { |
37 | for (ParameterMake pm : parameterMakeList) { | 37 | for (ParameterMake pm : parameterMakeList) { |
38 | - if(!IGNORE_LIST.contains(pm.getParameterValue())){ | ||
39 | - parameterValueSet.add(pm.getParameterValue()); | 38 | + if(pm.getParameterValue() != null && pm.getParameterValue().length() > 1 && !IGNORE_LIST.contains(pm.getParameterValue())){ |
39 | + for(String item : pm.getParameterValue().split("\\/")){ | ||
40 | + parameterValueSet.add(item); | ||
41 | + } | ||
40 | } | 42 | } |
41 | } | 43 | } |
42 | } | 44 | } |
@@ -48,4 +50,8 @@ public class ParameterMakeSuggestionDiscoverer extends AbstractSuggestionDiscove | @@ -48,4 +50,8 @@ public class ParameterMakeSuggestionDiscoverer extends AbstractSuggestionDiscove | ||
48 | public KeywordType getKeywordType() { | 50 | public KeywordType getKeywordType() { |
49 | return KeywordType.ParameterMake; | 51 | return KeywordType.ParameterMake; |
50 | } | 52 | } |
53 | + | ||
54 | + public static void main(String[] args) { | ||
55 | + System.out.println(Arrays.asList("羊毛/羊绒".split("\\/"))); | ||
56 | + } | ||
51 | } | 57 | } |
-
Please register or login to post a comment