I'm working with an elastic API on a url like https://something.xyzw.eg/api/search/advance (not the real url). The API works fine on postman. Also the python code generated by postman works fine and returns results. However when using leasticsearch-dsl package I keep getting:
Failed to establish a new connection: [Errno -2] Name or service not known)
Here is my code similar to the first example on documents:
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search
client = Elasticsearch(host='https://something.xyzw.eg/api/search/advance')
s = Search(using=client)
response = s.execute()
Any idea what I'm doing wrong?
Edit:
Apparently host shouldn't contain a url, but a hostname. However, I don't have any control on where the API is. Is there a workaround to get elasticsearch to work with url?