...
|
...
|
@@ -3,6 +3,7 @@ package com.yoho.search.recall.beans.helper; |
|
|
import com.yoho.search.base.utils.DateUtil;
|
|
|
import com.yoho.search.base.utils.ProductIndexEsField;
|
|
|
import com.yoho.search.core.personalized.models.SortBrand;
|
|
|
import com.yoho.search.recall.config.SpecialShopConstants;
|
|
|
import org.apache.lucene.search.join.ScoreMode;
|
|
|
import org.elasticsearch.index.query.BoolQueryBuilder;
|
|
|
import org.elasticsearch.index.query.QueryBuilder;
|
...
|
...
|
@@ -14,6 +15,7 @@ import java.util.List; |
|
|
|
|
|
public class ExtendFilterHelper {
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 流量补偿的过滤器
|
|
|
*
|
...
|
...
|
@@ -24,6 +26,7 @@ public class ExtendFilterHelper { |
|
|
filter.must(QueryBuilders.termQuery(ProductIndexEsField.flowType, "1"));
|
|
|
filter.mustNot(QueryBuilders.rangeQuery(ProductIndexEsField.breakSizePercent).gt(50));
|
|
|
filter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.isGlobal, "Y"));
|
|
|
filter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.shopId, SpecialShopConstants.QXJS_SHOP_ID));
|
|
|
return filter;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -37,6 +40,7 @@ public class ExtendFilterHelper { |
|
|
filter.must(QueryBuilders.termQuery(ProductIndexEsField.toAddScore, "Y"));
|
|
|
filter.mustNot(QueryBuilders.rangeQuery(ProductIndexEsField.breakSizePercent).gt(50));
|
|
|
filter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.isGlobal, "Y"));
|
|
|
filter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.shopId, SpecialShopConstants.QXJS_SHOP_ID));
|
|
|
return filter;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -221,6 +225,7 @@ public class ExtendFilterHelper { |
|
|
filter.should(QueryBuilders.termQuery(ProductIndexEsField.isGlobal, "Y"));
|
|
|
//filter.should(QueryBuilders.rangeQuery(ProductIndexEsField.breakSizePercent).gt(50));
|
|
|
filter.should(QueryBuilders.termsQuery(ProductIndexEsField.storeShowStatus, Arrays.asList("3", "4")));
|
|
|
filter.should(QueryBuilders.termQuery(ProductIndexEsField.shopId, SpecialShopConstants.QXJS_SHOP_ID));
|
|
|
return filter;
|
|
|
}
|
|
|
|
...
|
...
|
|