Authored by hugufei

添加search.persional.newstrategy.promotion.open动态配置

@@ -124,17 +124,6 @@ public class SearchDynamicConfigService { @@ -124,17 +124,6 @@ public class SearchDynamicConfigService {
124 } 124 }
125 125
126 /** 126 /**
127 - * 品类页召回时使用的uid[尾数]  
128 - */  
129 - public boolean isGoToSortRecallUser(int uid) {  
130 - String uidMantissas = configReader.getString("search.sortpage.recall.uid.mantissa", "0,1,2,3,4,5,6,7,8,9");  
131 - if (uidMantissas.contains(String.valueOf(uid % 10))) {  
132 - return true;  
133 - }  
134 - return false;  
135 - }  
136 -  
137 - /**  
138 * 品类页召回时是否使用全局品牌id 127 * 品类页召回时是否使用全局品牌id
139 */ 128 */
140 public boolean isSortPageRecallUseGlobalBrand() { 129 public boolean isSortPageRecallUseGlobalBrand() {
@@ -196,6 +185,15 @@ public class SearchDynamicConfigService { @@ -196,6 +185,15 @@ public class SearchDynamicConfigService {
196 } 185 }
197 186
198 /** 187 /**
  188 + * 促销页使用新的的召回策略
  189 + *
  190 + * @return
  191 + */
  192 + public boolean searchPersionalNewStrategyPromotionOpen() {
  193 + return configReader.getBoolean("search.persional.newstrategy.promotion.open", true);
  194 + }
  195 +
  196 + /**
199 * 使用性能高的召回场景【双11打开】 197 * 使用性能高的召回场景【双11打开】
200 * 198 *
201 * @return 199 * @return
@@ -13,6 +13,7 @@ import com.yoho.search.recall.scene.beans.builder.RecallParamsBuilder; @@ -13,6 +13,7 @@ import com.yoho.search.recall.scene.beans.builder.RecallParamsBuilder;
13 import com.yoho.search.recall.scene.models.RecallParams; 13 import com.yoho.search.recall.scene.models.RecallParams;
14 import com.yoho.search.service.base.SearchCacheService; 14 import com.yoho.search.service.base.SearchCacheService;
15 import com.yoho.search.service.base.SearchCommonService; 15 import com.yoho.search.service.base.SearchCommonService;
  16 +import com.yoho.search.service.base.SearchDynamicConfigService;
16 import com.yoho.search.service.helper.ProductListHelper; 17 import com.yoho.search.service.helper.ProductListHelper;
17 import com.yoho.search.service.helper.SearchCommonHelper; 18 import com.yoho.search.service.helper.SearchCommonHelper;
18 import com.yoho.search.service.helper.SearchParamHelper; 19 import com.yoho.search.service.helper.SearchParamHelper;
@@ -46,6 +47,8 @@ public class PromotionProductListService extends AbstractCacheAbleService { @@ -46,6 +47,8 @@ public class PromotionProductListService extends AbstractCacheAbleService {
46 private RecallParamsBuilder recallParamsBuilder; 47 private RecallParamsBuilder recallParamsBuilder;
47 @Autowired 48 @Autowired
48 private SceneRecallProductListService sceneRecallProductListService; 49 private SceneRecallProductListService sceneRecallProductListService;
  50 + @Autowired
  51 + private SearchDynamicConfigService searchDynamicConfigService;
49 52
50 @Override 53 @Override
51 public SearchCache getSearchCache() { 54 public SearchCache getSearchCache() {
@@ -74,7 +77,7 @@ public class PromotionProductListService extends AbstractCacheAbleService { @@ -74,7 +77,7 @@ public class PromotionProductListService extends AbstractCacheAbleService {
74 BoolQueryBuilder promotionMustFilter = promotionSceneHelper.getMustFilterByPromotion(promotionConditions); 77 BoolQueryBuilder promotionMustFilter = promotionSceneHelper.getMustFilterByPromotion(promotionConditions);
75 78
76 //3、个性化-走召回逻辑 79 //3、个性化-走召回逻辑
77 - if (searchCommonHelper.isPersionalScene(paramMap)) { 80 + if (this.goRecallLogic(paramMap)) {
78 RecallParams promotionRecallParams = recallParamsBuilder.buildPromotionRecallParams(paramMap, promotionMustFilter, pageSize); 81 RecallParams promotionRecallParams = recallParamsBuilder.buildPromotionRecallParams(paramMap, promotionMustFilter, pageSize);
79 return sceneRecallProductListService.recallProductList(promotionRecallParams, page); 82 return sceneRecallProductListService.recallProductList(promotionRecallParams, page);
80 } 83 }
@@ -83,6 +86,17 @@ public class PromotionProductListService extends AbstractCacheAbleService { @@ -83,6 +86,17 @@ public class PromotionProductListService extends AbstractCacheAbleService {
83 return this.defaultPromotionList(paramMap, promotionMustFilter, page, pageSize); 86 return this.defaultPromotionList(paramMap, promotionMustFilter, page, pageSize);
84 } 87 }
85 88
  89 + private boolean goRecallLogic(Map<String, String> paramMap){
  90 + if(!searchCommonHelper.isPersionalScene(paramMap)){
  91 + return false;
  92 + }
  93 + if(!searchDynamicConfigService.searchPersionalNewStrategyPromotionOpen()){
  94 + return false;
  95 + }
  96 + return true;
  97 + }
  98 +
  99 +
86 /** 100 /**
87 * 默认的促销列表的返回方式 101 * 默认的促销列表的返回方式
88 * 102 *
@@ -3,9 +3,6 @@ @@ -3,9 +3,6 @@
3 #search direct downgrade, true:direct degrade, false:not direct degrade 3 #search direct downgrade, true:direct degrade, false:not direct degrade
4 search.degrade.direct.downgrade=false 4 search.degrade.direct.downgrade=false
5 5
6 -#search open personalized[true:open personalized, false:close personalized]  
7 -search.degrade.open.personalized=true  
8 -  
9 #search open personalized based vector feature 6 #search open personalized based vector feature
10 search.personalized.vectorfeature.open=true 7 search.personalized.vectorfeature.open=true
11 8
@@ -38,14 +35,17 @@ search.suggestion.tips.conversion.open=true @@ -38,14 +35,17 @@ search.suggestion.tips.conversion.open=true
38 #searchlike.not_in_shop.same_sort_percent 35 #searchlike.not_in_shop.same_sort_percent
39 search.searchlike.not_in_shop.same_sort_percent=60 36 search.searchlike.not_in_shop.same_sort_percent=60
40 37
41 -#recall  
42 -search.sortpage.recall.open=true 38 +#persional
  39 +search.degrade.open.personalized=true
  40 +
  41 +search.persional.performancestrategy.open=false
  42 +
  43 +search.sortpage.recall.open=false
43 search.sortpage.recall.use_global_brand=false 44 search.sortpage.recall.use_global_brand=false
44 search.sortpage.recall.brand.count=30 45 search.sortpage.recall.brand.count=30
45 -search.sortpage.recall.uid.mantissa=0,1,2,3,4,5,6,7,8,9  
46 46
47 -search.persional.newstrategy.open=false  
48 -search.persional.performancestrategy.open=false 47 +search.persional.newstrategy.open=true
  48 +search.persional.newstrategy.promotion.open=true
49 49
50 #rateLimit 50 #rateLimit
51 search.persional.rateLimit.open=true 51 search.persional.rateLimit.open=true