We do own 2 AWS Elasticsearch clusters, out of which one got upgraded to 7.1 version while the latter is still on 6.8 version. We did scala code changes to accommodate this upgradation(as our existing jobs were failing with unsupported version error with the new 7.x cluster). Post the code change, we were planning the code built using new maven dependency against the cluster running with 6.8 version. But the update jobs on index failed with the **"{"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}"**
The error is obvious as the POST calls made using 7.5.1 and 6.8 versions are quite different as follows:
W.r.t ES 7.5.1 => POST test/_update/1
W.r.t ES 6.8 => POST test/_doc/1/_update
ES 6.8 cluster is expecting _doc keyword in the URL which is not supported in 7.5.1. Is there any way we can reuse the code by switching the api version while making the call?
Thanks for the quick turnaround. When I was looking through the documentation, I did see that the upgrade from 6.x to 7.x will not break any existing modules and the API calls supported by 6.8 will be supported in 7.x as well with few exceptions. Is this limitation because of using java-rest client instead of native client? Or did I misunderstood something
TBC a 6.x client should work against a 7.x cluster, but not the other way round. 7.x clusters support the 6.x-style POST /i/_doc/1/_update form of update.
There were issues when we tried to run a job written with 6.8.3 elasticsearch-rest-high-level-client dependency against 7.1.1 AWS managed ES cluster(it got autoupgraded from 6.8.3). The jobs failed with unknown elasticsearch version which is why we switched the library
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.