Open yahavb opened 4 years ago
Line 127 in es2csv.py is the cause of the issue and it is because the result set has changed in ElasticSearch 7.0.
self.num_results = res['hits']['total']
returns a dict rather than the number expected. Changing line 127 to the following fixes the issue
self.num_results = res['hits']['total']['value']
This is caused by a breaking change in ElasticSearch 7.0 where hits are now returned as an object. https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-7.0.html#hits-total-now-object-search-response
I must overlook something here so sorry for the basic question here!
after installing es2csv I tried to run it against public ES cluster
es2csv --verify-certs -u https://myes.com -i logstash-* -D log -q 'spot' -o database.csv
I get
Not sure what I need to add to avoid the cast issue.