I am currently getting backwards incompatibility issue when hitting endpoint of /update using elastic.v7 as client to Elasticsearch 6.x server.
I noticed that for update, the 7.x endpoint is POST /<index>/_update/<_id>, while the 6.x is expecting POST /<index>/_doc/<_id>/_update.
This results in that when I make update operation from v7 client to 6.x Elasticsearch server, I am seeing the error below
{"error":{"root_cause":[{"type":"invalid_type_name_exception","reason":"Document mapping type name can't start with '_', found: [_update]"}],"type":"invalid_type_name_exception","reason":"Document mapping type name can't start with '_', found: [_update]"},"status":400}
I found this difference when I enabled client side tracelog.
Which version of Elastic are you using?
[x] elastic.v7 (for Elasticsearch 7.x, was actually using 6.x server though, as a way to test backwards compatibility)
[] elastic.v6 (for Elasticsearch 6.x)
[ ] elastic.v5 (for Elasticsearch 5.x)
[ ] elastic.v3 (for Elasticsearch 2.x)
[ ] elastic.v2 (for Elasticsearch 1.x)
Please describe the expected behavior
Successful update with POST /<index>/_update/<_id> from v7 client to both Elasticsearch 6.x and 7.x servers.
Please describe the actual behavior
Error described above with POST /<index>/_update/<_id> endpoint from v7 client to Elasticsearch 6.x server.
Any steps to reproduce the behavior?
Spin up a ES 6 server
Use elastic v7 as client
Create an index
Insert a document
Update the document with POST /<index>/_update/<_id> endpoint from elastic.v7
Is this a suggestion of not to use v7 client for 6.x server? Originally I am thinking of sticking this plan as it would be easier to use one client to request to both Elasticsearch servers (v6 and v7).
I am currently getting backwards incompatibility issue when hitting endpoint of
/update
using elastic.v7 as client to Elasticsearch 6.x server. I noticed that for update, the 7.x endpoint isPOST /<index>/_update/<_id>
, while the 6.x is expectingPOST /<index>/_doc/<_id>/_update
.This results in that when I make update operation from v7 client to 6.x Elasticsearch server, I am seeing the error below
I found this difference when I enabled client side tracelog.
Which version of Elastic are you using?
[x] elastic.v7 (for Elasticsearch 7.x, was actually using 6.x server though, as a way to test backwards compatibility) [] elastic.v6 (for Elasticsearch 6.x) [ ] elastic.v5 (for Elasticsearch 5.x) [ ] elastic.v3 (for Elasticsearch 2.x) [ ] elastic.v2 (for Elasticsearch 1.x)
Please describe the expected behavior
Successful update with
POST /<index>/_update/<_id>
from v7 client to both Elasticsearch 6.x and 7.x servers.Please describe the actual behavior
Error described above with
POST /<index>/_update/<_id>
endpoint from v7 client to Elasticsearch 6.x server.Any steps to reproduce the behavior?
POST /<index>/_update/<_id>
endpoint from elastic.v7Is this a suggestion of not to use v7 client for 6.x server? Originally I am thinking of sticking this plan as it would be easier to use one client to request to both Elasticsearch servers (v6 and v7).