mirror of
https://github.com/searxng/searxng.git
synced 2026-07-17 21:41:24 +00:00
[fix] autocomplete suggestrelevance scores for chromium
This commit is contained in:
@@ -845,7 +845,10 @@ def autocompleter():
|
||||
mimetype = 'application/json'
|
||||
else:
|
||||
# the suggestion request comes from browser's URL bar
|
||||
suggestions = json.dumps([sug_prefix, results])
|
||||
relevances = {
|
||||
'google:suggestrelevance': [600 - i for i in range(len(results))]
|
||||
} # chromium only shows 3 suggestions unless we attach relevances
|
||||
suggestions = json.dumps([sug_prefix, results, [], [], relevances])
|
||||
mimetype = 'application/x-suggestions+json'
|
||||
|
||||
suggestions = escape(suggestions, False)
|
||||
|
||||
Reference in New Issue
Block a user