Merge branch 'recall_config' into 0510
Showing
3 changed files
with
7 additions
and
5 deletions
@@ -6,6 +6,5 @@ import java.util.List; | @@ -6,6 +6,5 @@ import java.util.List; | ||
6 | public class SpecialShopConstants { | 6 | public class SpecialShopConstants { |
7 | 7 | ||
8 | public static final List<Integer> DOWNGRADE_SHOPIDS = Arrays.asList(3504); | 8 | public static final List<Integer> DOWNGRADE_SHOPIDS = Arrays.asList(3504); |
9 | - public static final float DOWNGRADE_SHOPID_WEIGHT = 0.1f; | ||
10 | 9 | ||
11 | } | 10 | } |
@@ -52,7 +52,7 @@ public class FunctionScoreSearchHelper { | @@ -52,7 +52,7 @@ public class FunctionScoreSearchHelper { | ||
52 | // 新品到着的个性化时间维度 | 52 | // 新品到着的个性化时间维度 |
53 | private static final FirstShelveTimeScore NEW_REC_FIRST_SHELVE_SCORE = new FirstShelveTimeScore(4, 1, 3); | 53 | private static final FirstShelveTimeScore NEW_REC_FIRST_SHELVE_SCORE = new FirstShelveTimeScore(4, 1, 3); |
54 | // 模糊搜索的个性化时间维度 | 54 | // 模糊搜索的个性化时间维度 |
55 | - private static final FirstShelveTimeScore FUZZY_FIRST_SHELVE_SCORE = new FirstShelveTimeScore(180, 150, 30); | 55 | + private static final FirstShelveTimeScore FUZZY_FIRST_SHELVE_SCORE = new FirstShelveTimeScore(90, 60, 30); |
56 | 56 | ||
57 | /** | 57 | /** |
58 | * 添加打分规则 | 58 | * 添加打分规则 |
@@ -152,7 +152,11 @@ public class FunctionScoreSearchHelper { | @@ -152,7 +152,11 @@ public class FunctionScoreSearchHelper { | ||
152 | scorers.add(searchScorerFactory.getCsBrandKeyWordScorer(query)); | 152 | scorers.add(searchScorerFactory.getCsBrandKeyWordScorer(query)); |
153 | } | 153 | } |
154 | // 7、添加特殊店铺的打分器 | 154 | // 7、添加特殊店铺的打分器 |
155 | - scorers.add(searchScorerFactory.getSpecialShopScorer(SpecialShopConstants.DOWNGRADE_SHOPIDS, SpecialShopConstants.DOWNGRADE_SHOPID_WEIGHT)); | 155 | + if(StringUtils.isNotBlank(query) && query.contains("adidas")){ |
156 | + scorers.add(searchScorerFactory.getSpecialShopScorer(SpecialShopConstants.DOWNGRADE_SHOPIDS, 0.1f)); | ||
157 | + }else{ | ||
158 | + scorers.add(searchScorerFactory.getSpecialShopScorer(SpecialShopConstants.DOWNGRADE_SHOPIDS, 0.6f)); | ||
159 | + } | ||
156 | return scorers; | 160 | return scorers; |
157 | } | 161 | } |
158 | 162 |
@@ -116,11 +116,10 @@ public class ProductCountServiceImpl extends AbstractCacheAbleService implements | @@ -116,11 +116,10 @@ public class ProductCountServiceImpl extends AbstractCacheAbleService implements | ||
116 | private BoolQueryBuilder genScoreDefaultFilter() { | 116 | private BoolQueryBuilder genScoreDefaultFilter() { |
117 | BoolQueryBuilder mustFilter = QueryBuilders.boolQuery(); | 117 | BoolQueryBuilder mustFilter = QueryBuilders.boolQuery(); |
118 | mustFilter.must(QueryBuilders.termQuery(ProductIndexEsField.status, 1)); | 118 | mustFilter.must(QueryBuilders.termQuery(ProductIndexEsField.status, 1)); |
119 | - mustFilter.must(QueryBuilders.rangeQuery(ProductIndexEsField.storageNum).gte(3)); | 119 | + mustFilter.must(QueryBuilders.rangeQuery(ProductIndexEsField.storageNum).gte(10)); |
120 | mustFilter.must(QueryBuilders.termQuery(ProductIndexEsField.isOutlets, 2)); | 120 | mustFilter.must(QueryBuilders.termQuery(ProductIndexEsField.isOutlets, 2)); |
121 | mustFilter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.attribute, 2)); | 121 | mustFilter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.attribute, 2)); |
122 | mustFilter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.isGlobal, "Y")); | 122 | mustFilter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.isGlobal, "Y")); |
123 | - mustFilter.mustNot(QueryBuilders.termsQuery(ProductIndexEsField.shopId, SpecialShopConstants.DOWNGRADE_SHOPIDS)); | ||
124 | return mustFilter; | 123 | return mustFilter; |
125 | } | 124 | } |
126 | 125 |
-
Please register or login to post a comment