diff options
| author | Markus Heiser <markus.heiser@darmarIT.de> | 2022-06-12 12:26:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-12 12:26:59 +0200 |
| commit | 1bc5455db138ec8effc5db7a483c5badfb5e5dc9 (patch) | |
| tree | 3fb00d8d47642f198cba1b51431f7ec553f07843 | |
| parent | 2455f1d06a3b05e4eb86be274c308160262e4a87 (diff) | |
| parent | ee3f230d9365556224e73e762063fcf6b079daaa (diff) | |
Merge pull request #1315 from dalf/autocomplete-no-duplicate
Autocomplete: don't suggest the current query.
| -rwxr-xr-x | searx/webapp.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 425233a3b..2ec2f7edd 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -909,7 +909,8 @@ def autocompleter(): for result in raw_results: # attention: this loop will change raw_text_query object and this is # the reason why the sug_prefix was stored before (see above) - results.append(raw_text_query.changeQuery(result).getFullQuery()) + if result != sug_prefix: + results.append(raw_text_query.changeQuery(result).getFullQuery()) if len(raw_text_query.autocomplete_list) > 0: for autocomplete_text in raw_text_query.autocomplete_list: |