Switch to a 0.5 modifier

This commit is contained in:
Joseph Schorr 2015-04-20 13:00:56 -04:00
parent ae55b8dd0e
commit 62770674d4

View file

@ -291,7 +291,7 @@ class ConductSearch(ApiResource):
# Modify the results' scores via how close the query term is to each result's name.
for result in results:
name = result.get('short_name', result['name'])
lm_score = liquidmetal.score(name, query) or 1
lm_score = liquidmetal.score(name, query) or 0.5
result['score'] = result['score'] * lm_score
return {'results': sorted(results, key=itemgetter('score'), reverse=True)}