Showing
3 changed files
with
17 additions
and
2 deletions
@@ -249,13 +249,14 @@ public class UserRecallResponseBuilder { | @@ -249,13 +249,14 @@ public class UserRecallResponseBuilder { | ||
249 | // 3、插入【直通车】商品 | 249 | // 3、插入【直通车】商品 |
250 | iterator = sknResultList.iterator(); | 250 | iterator = sknResultList.iterator(); |
251 | int index = 0; | 251 | int index = 0; |
252 | + int directTrainIndexInterval = searchDynamicConfigService.directTrainIndexInterval(); | ||
252 | while (iterator.hasNext()) { | 253 | while (iterator.hasNext()) { |
253 | RecallMergerResult.SknResult sknResult = iterator.next(); | 254 | RecallMergerResult.SknResult sknResult = iterator.next(); |
254 | // 生成插入位置-超出新列表的长度,则直接丢弃 | 255 | // 生成插入位置-超出新列表的长度,则直接丢弃 |
255 | int totalNewProductListSize = results.size(); | 256 | int totalNewProductListSize = results.size(); |
256 | - int randomIndex = (int) (4 * (index++ + Math.random())); | 257 | + int randomIndex = (int) (directTrainIndexInterval * (index++ + Math.random())); |
257 | if (randomIndex == 0 && !results.isEmpty()) { | 258 | if (randomIndex == 0 && !results.isEmpty()) { |
258 | - randomIndex = 1; | 259 | + randomIndex = 1;//不影响firstSkn |
259 | } | 260 | } |
260 | if (randomIndex <= totalNewProductListSize) { | 261 | if (randomIndex <= totalNewProductListSize) { |
261 | results.add(randomIndex, sknResult); | 262 | results.add(randomIndex, sknResult); |
@@ -185,6 +185,16 @@ public class SearchDynamicConfigService { | @@ -185,6 +185,16 @@ public class SearchDynamicConfigService { | ||
185 | } | 185 | } |
186 | 186 | ||
187 | /** | 187 | /** |
188 | + * 新的的召回策略-最多预测的品牌品类 | ||
189 | + * | ||
190 | + * @return | ||
191 | + */ | ||
192 | + public int directTrainIndexInterval() { | ||
193 | + return configReader.getInt("search.persional.newstrategy.directtrain.index.interval",4); | ||
194 | + } | ||
195 | + | ||
196 | + | ||
197 | + /** | ||
188 | * 新的的召回策略-召回来后是否再次进行品类品牌的平衡 | 198 | * 新的的召回策略-召回来后是否再次进行品类品牌的平衡 |
189 | * | 199 | * |
190 | * @return | 200 | * @return |
@@ -53,7 +53,11 @@ search.persional.newstrategy.open=true | @@ -53,7 +53,11 @@ search.persional.newstrategy.open=true | ||
53 | search.persional.newstrategy.promotion.open=true | 53 | search.persional.newstrategy.promotion.open=true |
54 | search.persional.newstrategy.first_page_cache.open=false | 54 | search.persional.newstrategy.first_page_cache.open=false |
55 | search.persional.newstrategy.common.join_score.open=true | 55 | search.persional.newstrategy.common.join_score.open=true |
56 | +search.persional.newstrategy.forecast.max_sort_brand.count=20 | ||
57 | +search.persional.newstrategy.realtime.max_sort_brand.count=20 | ||
56 | search.persional.newstrategy.max_join_sort_brand.count=20 | 58 | search.persional.newstrategy.max_join_sort_brand.count=20 |
59 | +search.persional.newstrategy.directtrain.index.interval=4 | ||
60 | + | ||
57 | search.persional.newstrategy.sort_brand_balance.open=false | 61 | search.persional.newstrategy.sort_brand_balance.open=false |
58 | 62 | ||
59 | #rateLimit | 63 | #rateLimit |
-
Please register or login to post a comment