Description
Elasticsearch version (bin/elasticsearch --version
): 7.8.1
elasticsearch-py
version (elasticsearch.__versionstr__
): 7.8.1
Please make sure the major version matches the Elasticsearch server you are running.
Description of the problem including expected versus actual behavior:
I'm using AsyncElasticsearch. If I try to query a server with a url_prefix in the address, I get a 404 Not Found in the logs. The logs also mention the URL that the library tries to connect to, and the url prefix is missing from the URL. Expected behaviour is of course a reply to the query.
Steps to reproduce:
client = AsyncElasticsearch('https://es.example.com/prefix')
resp = await client.search(index='index', body={ 'query': { 'match': { 'field': 'value' } } } )
The issue seems to be in elasticsearch/_async/http_aiohttp.py, in perform_request(). It builds a URL using yarl without taking the url_prefix into account. This is still the case in the master branch