Authored by hugufei

新列表机制召回时排除断码商品

@@ -49,6 +49,7 @@ public class ExtendFilterHelper { @@ -49,6 +49,7 @@ public class ExtendFilterHelper {
49 //must not 49 //must not
50 filter.mustNot(forbiddenFlowFilter()); 50 filter.mustNot(forbiddenFlowFilter());
51 filter.mustNot(isGlobalFilter()); 51 filter.mustNot(isGlobalFilter());
  52 + filter.mustNot(breakSizeFilter());
52 return filter; 53 return filter;
53 } 54 }
54 55
@@ -73,6 +74,7 @@ public class ExtendFilterHelper { @@ -73,6 +74,7 @@ public class ExtendFilterHelper {
73 filter.mustNot(forbiddenFlowFilter()); 74 filter.mustNot(forbiddenFlowFilter());
74 filter.mustNot(latestReducePriceFilter()); 75 filter.mustNot(latestReducePriceFilter());
75 filter.mustNot(isGlobalFilter()); 76 filter.mustNot(isGlobalFilter());
  77 + filter.mustNot(breakSizeFilter());
76 return filter; 78 return filter;
77 } 79 }
78 80
@@ -89,6 +91,7 @@ public class ExtendFilterHelper { @@ -89,6 +91,7 @@ public class ExtendFilterHelper {
89 filter.mustNot(forbiddenFlowFilter()); 91 filter.mustNot(forbiddenFlowFilter());
90 filter.mustNot(newFilter()); 92 filter.mustNot(newFilter());
91 filter.mustNot(isGlobalFilter()); 93 filter.mustNot(isGlobalFilter());
  94 + filter.mustNot(breakSizeFilter());
92 return filter; 95 return filter;
93 } 96 }
94 97
@@ -105,6 +108,7 @@ public class ExtendFilterHelper { @@ -105,6 +108,7 @@ public class ExtendFilterHelper {
105 filter.mustNot(newFilter()); 108 filter.mustNot(newFilter());
106 filter.mustNot(latestReducePriceFilter()); 109 filter.mustNot(latestReducePriceFilter());
107 filter.mustNot(isGlobalFilter()); 110 filter.mustNot(isGlobalFilter());
  111 + filter.mustNot(breakSizeFilter());
108 return filter; 112 return filter;
109 } 113 }
110 114
@@ -122,6 +126,7 @@ public class ExtendFilterHelper { @@ -122,6 +126,7 @@ public class ExtendFilterHelper {
122 filter.mustNot(newFilter()); 126 filter.mustNot(newFilter());
123 filter.mustNot(latestReducePriceFilter()); 127 filter.mustNot(latestReducePriceFilter());
124 filter.mustNot(isGlobalFilter()); 128 filter.mustNot(isGlobalFilter());
  129 + filter.mustNot(breakSizeFilter());
125 return filter; 130 return filter;
126 } 131 }
127 132
@@ -137,6 +142,7 @@ public class ExtendFilterHelper { @@ -137,6 +142,7 @@ public class ExtendFilterHelper {
137 //must not 142 //must not
138 filter.mustNot(forbiddenFlowFilter()); 143 filter.mustNot(forbiddenFlowFilter());
139 filter.mustNot(isGlobalFilter()); 144 filter.mustNot(isGlobalFilter());
  145 + filter.mustNot(breakSizeFilter());
140 return filter; 146 return filter;
141 } 147 }
142 148
@@ -152,6 +158,10 @@ public class ExtendFilterHelper { @@ -152,6 +158,10 @@ public class ExtendFilterHelper {
152 return QueryBuilders.termsQuery(ProductIndexEsField.isnew,"Y"); 158 return QueryBuilders.termsQuery(ProductIndexEsField.isnew,"Y");
153 } 159 }
154 160
  161 + private static QueryBuilder breakSizeFilter (){
  162 + return QueryBuilders.rangeQuery(ProductIndexEsField.breakSizePercent).gt(50);
  163 + }
  164 +
155 private static QueryBuilder brandIdsFilter (List<Integer> brandIds){ 165 private static QueryBuilder brandIdsFilter (List<Integer> brandIds){
156 BoolQueryBuilder filter = QueryBuilders.boolQuery(); 166 BoolQueryBuilder filter = QueryBuilders.boolQuery();
157 if (brandIds != null && !brandIds.isEmpty()) { 167 if (brandIds != null && !brandIds.isEmpty()) {