Authored by hugufei

Merge branch 'recall_config' into 0510

... ... @@ -6,6 +6,5 @@ import java.util.List;
public class SpecialShopConstants {
public static final List<Integer> DOWNGRADE_SHOPIDS = Arrays.asList(3504);
public static final float DOWNGRADE_SHOPID_WEIGHT = 0.1f;
}
... ...
... ... @@ -52,7 +52,7 @@ public class FunctionScoreSearchHelper {
// 新品到着的个性化时间维度
private static final FirstShelveTimeScore NEW_REC_FIRST_SHELVE_SCORE = new FirstShelveTimeScore(4, 1, 3);
// 模糊搜索的个性化时间维度
private static final FirstShelveTimeScore FUZZY_FIRST_SHELVE_SCORE = new FirstShelveTimeScore(180, 150, 30);
private static final FirstShelveTimeScore FUZZY_FIRST_SHELVE_SCORE = new FirstShelveTimeScore(90, 60, 30);
/**
* 添加打分规则
... ... @@ -152,7 +152,11 @@ public class FunctionScoreSearchHelper {
scorers.add(searchScorerFactory.getCsBrandKeyWordScorer(query));
}
// 7、添加特殊店铺的打分器
scorers.add(searchScorerFactory.getSpecialShopScorer(SpecialShopConstants.DOWNGRADE_SHOPIDS, SpecialShopConstants.DOWNGRADE_SHOPID_WEIGHT));
if(StringUtils.isNotBlank(query) && query.contains("adidas")){
scorers.add(searchScorerFactory.getSpecialShopScorer(SpecialShopConstants.DOWNGRADE_SHOPIDS, 0.1f));
}else{
scorers.add(searchScorerFactory.getSpecialShopScorer(SpecialShopConstants.DOWNGRADE_SHOPIDS, 0.6f));
}
return scorers;
}
... ...
... ... @@ -116,11 +116,10 @@ public class ProductCountServiceImpl extends AbstractCacheAbleService implements
private BoolQueryBuilder genScoreDefaultFilter() {
BoolQueryBuilder mustFilter = QueryBuilders.boolQuery();
mustFilter.must(QueryBuilders.termQuery(ProductIndexEsField.status, 1));
mustFilter.must(QueryBuilders.rangeQuery(ProductIndexEsField.storageNum).gte(3));
mustFilter.must(QueryBuilders.rangeQuery(ProductIndexEsField.storageNum).gte(10));
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;
}
... ...