Main issue is that the type argument is gone and deprecated in 8.x
Also body is replaced by document in the doc and directly uses an object, so no need to stringify as it will switch the content type to text instead of json.
It seems though that body still works with 8.x. It was probably added as an alias for some kind of backward compat.
Should I submit a PR with the required changes ? I'm not sure though if this will break compatibility with older major versions of ES.
But afaik, anyway the JS client for elasticsearch 8.x will not work on a 7.x or earlier cluster....
Hi,
I wasn't able to use the plugin as it is against an elasticsearch 8.x cluster.
The result is an error message when the plugin attempts to push the data to the cluster.
It looks like the arguments to create() have changed between 7.x and 8.x elasticsearch JS client.
https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/7.17/api-reference.html#_create vs https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/8.11/api-reference.html#_create
Main issue is that the
type
argument is gone and deprecated in 8.xAlso
body
is replaced bydocument
in the doc and directly uses an object, so no need to stringify as it will switch the content type to text instead of json.It seems though that
body
still works with 8.x. It was probably added as an alias for some kind of backward compat.Should I submit a PR with the required changes ? I'm not sure though if this will break compatibility with older major versions of ES.
But afaik, anyway the JS client for elasticsearch 8.x will not work on a 7.x or earlier cluster....