Commit 6773cdbe42dd76174a4d07a87497cf3d6d9d33cd

Authored by tangwang
1 parent b3dc7426

fix

Showing 1 changed file with 1 additions and 5 deletions   Show diff stats
offline_tasks/scripts/i2i_content_similar.py
... ... @@ -135,11 +135,7 @@ def find_similar_by_vector(es, vector, field_name, k=KNN_K, num_candidates=KNN_C
135 135 base_score = hit['_score']
136 136  
137 137 # 获取on_sell_days_boost提权值,默认为1.0(不提权)
138   - boost = hit['_source'].get('on_sell_days_boost', 1.0)
139   -
140   - # 确保boost在合理范围内
141   - if boost is None or boost < 0.9 or boost > 1.1:
142   - boost = 1.0
  138 + boost = hit['_source'].get('on_sell_days_boost', 1.0) or 1.0
143 139  
144 140 # 应用提权
145 141 boosted_score = base_score * boost
... ...