victordibia / neuralqa

NeuralQA: A Usable Library for Question Answering on Large Datasets with BERT
https://victordibia.github.io/neuralqa/
MIT License
233 stars 32 forks source link

Retrieval username & password ignored #55

Closed jvence closed 3 years ago

jvence commented 3 years ago

I specified an elasticsearch retrieval that requires authentication. I specified the username and password in the options section of the retrieval. When I try to run a query, the app fails with:

Error Fetching Passages. ConnectionError(<urllib3.connection.HTTPConnection object at 0x15cd3a490>: Failed to establish a new connection: [Errno 61] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x15cd3a490>: Failed to establish a new connection: [Errno 61] Connection refused)

Looking at the code seems to indicate that the username and password are not used anywhere in the code.

http_auth=('user', 'secret') required in ElasticSearchRetriever - will submit a pull request.

jvence commented 3 years ago

Latest implementation of elasticsearch authentication does not work. Using self.es = Elasticsearch(hosts="http://username:password@hostname:9200/") seems to solve the problem.

jvence commented 3 years ago

Actually after further reviews, I had a type in the password. This is working fine.