You need to pass the username and password to the Elasticsearch object as shown below:
es = Elasticsearch(['http://localhost:8080'], http_auth=('user', 'pass'))
You need to pass the username and password to the Elasticsearch object as shown below:
es = Elasticsearch(['http://localhost:8080'], http_auth=('user', 'pass'))