diff options
author | Richard Lyons <frob@cloudstaff.com> | 2024-06-19 22:55:26 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2024-06-20 06:30:00 +0200 |
commit | f195d98bfbcf96e7bf2532419b1f3804ebd739a1 (patch) | |
tree | 3a05f395566943ba0ee8d19b9f74957e38c23696 /searx/engines/elasticsearch.py | |
parent | acf3f109b2a99a5e6f25f5f2975016a36673c6ef (diff) | |
download | searxng-f195d98bfbcf96e7bf2532419b1f3804ebd739a1.tar.gz searxng-f195d98bfbcf96e7bf2532419b1f3804ebd739a1.zip |
Fix search_url building.
Diffstat (limited to 'searx/engines/elasticsearch.py')
-rw-r--r-- | searx/engines/elasticsearch.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/elasticsearch.py b/searx/engines/elasticsearch.py index 7bddab1cb..c721114a7 100644 --- a/searx/engines/elasticsearch.py +++ b/searx/engines/elasticsearch.py @@ -49,7 +49,7 @@ base_url = 'http://localhost:9200' username = '' password = '' index = '' -search_url = base_url + '/' + index + '/_search' +search_url = '{base_url}/{index}/_search' query_type = 'match' custom_query_json = {} show_metadata = False @@ -71,7 +71,7 @@ def request(query, params): if username and password: params['auth'] = (username, password) - params['url'] = search_url + params['url'] = search_url.format(base_url=base_url, index=index) params['method'] = 'GET' params['data'] = dumps(_available_query_types[query_type](query)) params['headers']['Content-Type'] = 'application/json' |