Question
I have an Elasticsearch instance on cloud (i.e. https://cloud.elastic.co/home) and I want to use it as DocumentStore on Haystack.
I have tried to directly use your interface https://github.com/deepset-ai/haystack/blob/master/haystack/database/elasticsearch.py#L17 but it seems not to work. In particular, I have tried to feed host and port using the same provided by Elastic Cloud. In your opinion, what could be the error that prevents me from accessing?
Additional context
I have solved it in this fork (https://github.com/antoniolanza1996/haystack) simply adding 2 extra parameters, as suggested by https://elasticsearch-py.readthedocs.io/en/master/#connecting-via-cloud-id. However, I was wondering if it is possible to use my cloud instance directly using your defined parameters and avoid to have my own fork.
@antoniolanza1996 I am using an elastic search instance on google cloud without making any changes in haystack. All I have done is to pass the elastic url, port no, userid and password. For https connection, generate a certifi certificate and pass the path of the certificate.
document_store = ElasticsearchDocumentStore(host="xxxx.us3.gcp.cloud.es.io", port=9243, scheme='https',ca_certs="/usr/local/lib/python3.6/dist-packages/certifi/cacert.pem" , username="elastic-username", password="elastic-password", index="document",
embedding_field="embedding", embedding_dim=768)
@nsankar Thank you! Now it works.
Most helpful comment
@antoniolanza1996 I am using an elastic search instance on google cloud without making any changes in haystack. All I have done is to pass the elastic url, port no, userid and password. For https connection, generate a certifi certificate and pass the path of the certificate.
document_store = ElasticsearchDocumentStore(host="xxxx.us3.gcp.cloud.es.io", port=9243, scheme='https',ca_certs="/usr/local/lib/python3.6/dist-packages/certifi/cacert.pem" , username="elastic-username", password="elastic-password", index="document", embedding_field="embedding", embedding_dim=768)