Switch to a 0.5 modifier
This commit is contained in:
parent
ae55b8dd0e
commit
62770674d4
1 changed files with 1 additions and 1 deletions
|
@ -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)}
|
||||
|
|
Reference in a new issue