Skip to content

Commit

Permalink
Fix search_url building.
Browse files Browse the repository at this point in the history
  • Loading branch information
frob-cloudstaff authored and return42 committed Jun 20, 2024
1 parent acf3f10 commit f195d98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions searx/engines/elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
username = ''
password = ''
index = ''
search_url = base_url + '/' + index + '/_search'
search_url = '{base_url}/{index}/_search'
query_type = 'match'
custom_query_json = {}
show_metadata = False
Expand All @@ -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'
Expand Down

0 comments on commit f195d98

Please sign in to comment.