Authored by hugufei

注释修复

@@ -85,31 +85,32 @@ public class ExtendFilterHelper { @@ -85,31 +85,32 @@ public class ExtendFilterHelper {
85 } 85 }
86 86
87 /** 87 /**
88 - * 不能加任何额外条件 88 + * 页面的人气兜底策略
89 * 89 *
90 * @return 90 * @return
91 */ 91 */
92 - public static QueryBuilder commonCtrValueFilter() { 92 + public static QueryBuilder commonHeatValueFilter() {
93 BoolQueryBuilder filter = QueryBuilders.boolQuery(); 93 BoolQueryBuilder filter = QueryBuilders.boolQuery();
94 - filter.must(QueryBuilders.rangeQuery(ProductIndexEsField.ctrValue).gt(0)); 94 + filter.must(QueryBuilders.rangeQuery(ProductIndexEsField.heatValue).gt(0));
95 //must not 95 //must not
96 filter.mustNot(notRecallFilter()); 96 filter.mustNot(notRecallFilter());
97 return filter; 97 return filter;
98 } 98 }
99 99
100 /** 100 /**
101 - * 不能加任何额外条件 101 + * 页面的点击率兜底策略
102 * 102 *
103 * @return 103 * @return
104 */ 104 */
105 - public static QueryBuilder commonHeatValueFilter() { 105 + public static QueryBuilder commonCtrValueFilter() {
106 BoolQueryBuilder filter = QueryBuilders.boolQuery(); 106 BoolQueryBuilder filter = QueryBuilders.boolQuery();
107 - filter.must(QueryBuilders.rangeQuery(ProductIndexEsField.heatValue).gt(0)); 107 + filter.must(QueryBuilders.rangeQuery(ProductIndexEsField.ctrValue).gt(0));
108 //must not 108 //must not
109 filter.mustNot(notRecallFilter()); 109 filter.mustNot(notRecallFilter());
110 return filter; 110 return filter;
111 } 111 }
112 112
  113 +
113 /** 114 /**
114 * 【品类+品牌】人气-【除去新品,新降价和新开促销】 115 * 【品类+品牌】人气-【除去新品,新降价和新开促销】
115 * 116 *
@@ -237,19 +238,15 @@ public class ExtendFilterHelper { @@ -237,19 +238,15 @@ public class ExtendFilterHelper {
237 return filter; 238 return filter;
238 } 239 }
239 240
240 -  
241 public static void main(String[] args) { 241 public static void main(String[] args) {
242 BoolQueryBuilder filter = QueryBuilders.boolQuery(); 242 BoolQueryBuilder filter = QueryBuilders.boolQuery();
243 // filter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.flowType, "2")); 243 // filter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.flowType, "2"));
244 // filter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.isGlobal, "Y")); 244 // filter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.isGlobal, "Y"));
245 // filter.mustNot(QueryBuilders.rangeQuery(ProductIndexEsField.breakSizePercent).gt(50)); 245 // filter.mustNot(QueryBuilders.rangeQuery(ProductIndexEsField.breakSizePercent).gt(50));
246 -  
247 filter.mustNot(notRecallFilter()); 246 filter.mustNot(notRecallFilter());
248 SearchParam searchParam = new SearchParam(); 247 SearchParam searchParam = new SearchParam();
249 searchParam.setFiter(filter); 248 searchParam.setFiter(filter);
250 System.out.println(SearchParamUtils.genSearchSourceBuilderFromSearchParam(searchParam).toString()); 249 System.out.println(SearchParamUtils.genSearchSourceBuilderFromSearchParam(searchParam).toString());
251 -  
252 -  
253 } 250 }
254 251
255 } 252 }