scrapy-elasticsearch icon indicating copy to clipboard operation
scrapy-elasticsearch copied to clipboard

Missing header information for ElasticSearch 6.2

Open nerdstein opened this issue 6 years ago • 2 comments

Thank you all for putting together this great tool. I was thrilled to find this.

I am currently getting an error as follows:

{"error":"Content-Type header [] is not supported","status":406}

According to this URL, https://github.com/taskrabbit/elasticsearch-dump/issues/350 , additional headers need to be passed for ElasticSearch 6.x. As follows:

-headers='{"Content-Type": "application/json"}

Could this be a new configuration added?

nerdstein avatar Jun 19 '18 19:06 nerdstein

This is resolved by updating the elasticsearch requirement to the latest version

nerdstein avatar Jun 30 '18 18:06 nerdstein

Yeah, I will roll in some es version detection and insert the header.

jayzeng avatar Sep 10 '19 19:09 jayzeng