diff options
| author | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2015-01-10 16:42:57 +0100 |
|---|---|---|
| committer | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2015-01-10 16:42:57 +0100 |
| commit | 4e2dae30f013d8ef9fd6d22e3f01e38f13f13c11 (patch) | |
| tree | bc18637a8b235bc7c9027fbb1d897df20f84675f /searx/webapp.py | |
| parent | 29a526ff0e33030fc9d1416a9ccfeba93e376664 (diff) | |
[enh] add autocompletion for searx-specific strings
Diffstat (limited to 'searx/webapp.py')
| -rw-r--r-- | searx/webapp.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 93af05083..3dcba2968 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -46,7 +46,7 @@ from searx.languages import language_codes from searx.https_rewrite import https_url_rewrite from searx.search import Search from searx.query import Query -from searx.autocomplete import backends as autocomplete_backends +from searx.autocomplete import searx_bang, backends as autocomplete_backends from searx import logger @@ -352,8 +352,11 @@ def autocompleter(): if not completer: return + # parse searx specific autocompleter results like !bang + raw_results = searx_bang(query) + # run autocompletion - raw_results = completer(query.getSearchQuery()) + raw_results.extend(completer(query.getSearchQuery())) # parse results (write :language and !engine back to result string) results = [] |