mirror of
https://github.com/searxng/searxng.git
synced 2025-07-24 21:59:22 +02:00
[fix] never pass bangs to autocomplete suggestions
This commit is contained in:
parent
69c8ad86f3
commit
40272b0044
2 changed files with 9 additions and 2 deletions
|
@ -636,8 +636,11 @@ def autocompleter():
|
|||
# parse searx specific autocompleter results like !bang
|
||||
raw_results = searx_bang(raw_text_query)
|
||||
|
||||
# normal autocompletion results only appear if max 3 inner results returned
|
||||
if len(raw_results) <= 3 and completer:
|
||||
# normal autocompletion results only appear if no inner results returned
|
||||
# and there is a query part besides the engine and language bangs
|
||||
if len(raw_results) == 0 and completer and (len(raw_text_query.query_parts) > 1 or
|
||||
(len(raw_text_query.languages) == 0 and
|
||||
not raw_text_query.specific)):
|
||||
# get language from cookie
|
||||
language = request.preferences.get_value('language')
|
||||
if not language or language == 'all':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue