jayzeng / scrapy-elasticsearch

A scrapy pipeline which send items to Elastic Search server
327 stars 88 forks source link

Missing header information for ElasticSearch 6.2 #78

Open nerdstein opened 6 years ago

nerdstein commented 6 years ago

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 commented 6 years ago

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

jayzeng commented 5 years ago

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