|
@@ -1642,6 +1642,8 @@ def video_homepage_recommend(request_id, mid, uid, size, app_type, algo_type,
|
|
|
# })
|
|
|
recommend_result['recommendOperation'] = result
|
|
|
rank_result = result.get('rankResult')
|
|
|
+ for i, item in enumerate(rank_result):
|
|
|
+ item['position'] = i + 1
|
|
|
recommend_result['videos'] = rank_result
|
|
|
recommend_result['getRecommendResultTime'] = (time.time() - get_result_st) * 1000
|
|
|
|
|
@@ -1770,6 +1772,8 @@ def video_relevant_recommend(request_id, video_id, mid, uid, size, app_type, ab_
|
|
|
# })
|
|
|
recommend_result['recommendOperation'] = result
|
|
|
rank_result = result.get('rankResult')
|
|
|
+ for i, item in enumerate(rank_result):
|
|
|
+ item['position'] = i+1
|
|
|
recommend_result['videos'] = rank_result
|
|
|
recommend_result['getRecommendResultTime'] = (time.time() - get_result_st) * 1000
|
|
|
|