# Update using Elasticsearch restlevel client 7.5.1 is failing on Elasticsearch 6.8 AWS cluster

**URL:** https://discuss.elastic.co/t/update-using-elasticsearch-restlevel-client-7-5-1-is-failing-on-elasticsearch-6-8-aws-cluster/214231
**Category:** Elasticsearch
**Created:** [January 8, 2020, 12:14pm UTC](https://discuss.elastic.co/t/update-using-elasticsearch-restlevel-client-7-5-1-is-failing-on-elasticsearch-6-8-aws-cluster/214231 "2020-01-08T12:14:58Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Aishwarya\_Gopikrishn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aishwarya_gopikrishn/32/60474_2.png) [@Aishwarya\_Gopikrishn](https://discuss.elastic.co/u/Aishwarya_Gopikrishn)
#### Post date: [January 8, 2020, 12:14pm UTC](https://discuss.elastic.co/t/update-using-elasticsearch-restlevel-client-7-5-1-is-failing-on-elasticsearch-6-8-aws-cluster/214231/1 "2020-01-08T12:14:58Z")

</div>

Hi Team,

```
 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}"**

```

**Maven Dependency**  
org.elasticsearch.client  
elasticsearch-rest-high-level-client  
7.5.1

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?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 8, 2020, 12:43pm UTC](https://discuss.elastic.co/t/update-using-elasticsearch-restlevel-client-7-5-1-is-failing-on-elasticsearch-6-8-aws-cluster/214231/2 "2020-01-08T12:43:29Z")

</div>

Welcome !

What I'm doing in such a case is to provide 2 versions of the same project. One is embedding the 7.x client and one is using the 6.x client.

You can't use a 7.x client on a 6.x cluster.

---

<div class="post-metadata">

### Author: ![Aishwarya\_Gopikrishn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aishwarya_gopikrishn/32/60474_2.png) [@Aishwarya\_Gopikrishn](https://discuss.elastic.co/u/Aishwarya_Gopikrishn)
#### Post date: [January 9, 2020, 9:45am UTC](https://discuss.elastic.co/t/update-using-elasticsearch-restlevel-client-7-5-1-is-failing-on-elasticsearch-6-8-aws-cluster/214231/3 "2020-01-09T09:45:09Z")

</div>

> [@dadoonet](#):
>
> Welcome !
> 
> What I'm doing in such a case is to provide 2 versions of the same project. One is embedding the 7.x client and one is using the 6.x client.
> 
> You can't use a 7.x client on a 6.x cluster.

Hello David,

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

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 9, 2020, 1:01pm UTC](https://discuss.elastic.co/t/update-using-elasticsearch-restlevel-client-7-5-1-is-failing-on-elasticsearch-6-8-aws-cluster/214231/4 "2020-01-09T13:01:08Z")

</div>

The problem is also with the old deprecated native client.

Some notes about compatibility here: [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-compatibility.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-compatibility.html)

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [January 9, 2020, 2:50pm UTC](https://discuss.elastic.co/t/update-using-elasticsearch-restlevel-client-7-5-1-is-failing-on-elasticsearch-6-8-aws-cluster/214231/5 "2020-01-09T14:50:14Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Aishwarya\_Gopikrishn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aishwarya_gopikrishn/32/60474_2.png) [@Aishwarya\_Gopikrishn](https://discuss.elastic.co/u/Aishwarya_Gopikrishn)
#### Post date: [January 21, 2020, 7:21am UTC](https://discuss.elastic.co/t/update-using-elasticsearch-restlevel-client-7-5-1-is-failing-on-elasticsearch-6-8-aws-cluster/214231/6 "2020-01-21T07:21:32Z")

</div>

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

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [January 21, 2020, 8:19am UTC](https://discuss.elastic.co/t/update-using-elasticsearch-restlevel-client-7-5-1-is-failing-on-elasticsearch-6-8-aws-cluster/214231/7 "2020-01-21T08:19:54Z")

</div>

> [@Aishwarya\_Gopikrishn](#):
>
> The jobs failed with unknown elasticsearch version

Can you be more precise about how these jobs failed? Do you have logs or stack traces of the problem?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 18, 2020, 8:19am UTC](https://discuss.elastic.co/t/update-using-elasticsearch-restlevel-client-7-5-1-is-failing-on-elasticsearch-6-8-aws-cluster/214231/8 "2020-02-18T08:19:56Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
