goldcaddy77/serverless-elasticsearch-client

Bulk api not working on later ES versions

Opened this issue · 2 comments

orr3 commented

Hi!
Using the client.bulk method on later versions of elasticsearch throws an error.
StatusCodeError: Content-Type header [application/x-ldjson] is not supported

Using:
serverless-elasticsearch-client version: 1.1.1
Elasticsearch version: 6.7

According to below discussions later releases of Elasticsearch are not supporting application/x-ldjson for the bulk request. The problem will be resolved by upgrading the js plugin dependency of elasticsearch (12.1.3) in package.json to a newer version.

See this discussion: https://discuss.elastic.co/t/node-bulk-indexing-not-working-content-type-header-application-x-ldjson-is-not-supported/114944

Hey thanks for submitting this issue. Would you mind submitting a PR?

orr3 commented

I'd love to but I'm too unexperienced to know would this update require more changes than a simple version bump. Here's the PR.