Authored by hugufei

Merge branch 'recall_config' into 0510

@@ -3,6 +3,7 @@ package com.yoho.search.service.service.impl; @@ -3,6 +3,7 @@ package com.yoho.search.service.service.impl;
3 import java.util.Date; 3 import java.util.Date;
4 import java.util.Map; 4 import java.util.Map;
5 5
  6 +import com.yoho.search.recall.config.SpecialShopConstants;
6 import org.apache.commons.lang.StringUtils; 7 import org.apache.commons.lang.StringUtils;
7 import org.elasticsearch.action.search.SearchType; 8 import org.elasticsearch.action.search.SearchType;
8 import org.elasticsearch.index.query.BoolQueryBuilder; 9 import org.elasticsearch.index.query.BoolQueryBuilder;
@@ -115,10 +116,11 @@ public class ProductCountServiceImpl extends AbstractCacheAbleService implements @@ -115,10 +116,11 @@ public class ProductCountServiceImpl extends AbstractCacheAbleService implements
115 private BoolQueryBuilder genScoreDefaultFilter() { 116 private BoolQueryBuilder genScoreDefaultFilter() {
116 BoolQueryBuilder mustFilter = QueryBuilders.boolQuery(); 117 BoolQueryBuilder mustFilter = QueryBuilders.boolQuery();
117 mustFilter.must(QueryBuilders.termQuery(ProductIndexEsField.status, 1)); 118 mustFilter.must(QueryBuilders.termQuery(ProductIndexEsField.status, 1));
118 - mustFilter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.attribute, 2));  
119 - mustFilter.must(QueryBuilders.rangeQuery(ProductIndexEsField.storageNum).gte(10));  
120 - mustFilter.must(QueryBuilders.rangeQuery(ProductIndexEsField.breakSizePercent).to(50)); 119 + mustFilter.must(QueryBuilders.rangeQuery(ProductIndexEsField.storageNum).gte(3));
121 mustFilter.must(QueryBuilders.termQuery(ProductIndexEsField.isOutlets, 2)); 120 mustFilter.must(QueryBuilders.termQuery(ProductIndexEsField.isOutlets, 2));
  121 + mustFilter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.attribute, 2));
  122 + mustFilter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.isGlobal, "Y"));
  123 + mustFilter.mustNot(QueryBuilders.termsQuery(ProductIndexEsField.shopId, SpecialShopConstants.DOWNGRADE_SHOPIDS));
122 return mustFilter; 124 return mustFilter;
123 } 125 }
124 126