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