Upgrading from OpenSearch 1.3 to OpenSearch 2.17

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

Upgrading from OpenSearch 1.3 to OpenSearch 2.17

Describe the issue:

We are running OpenSearch 1.3 server. The client version we are using is opensearch-rest-high-level-client:1.2.4

We want to the update the server to OpenSearch 2.17. We upgraded the server first. When we did the update, we noticed an exception for the client in indexing documents. See below for the logs.

Want to check if the client version opensearch-rest-high-level-client:1.2.4 is compatible with server version 2.17 ?

I tried updating the client to Opensearch-rest-high-level-client:2.17.1. This version seem to work with both Opensearch 1.3 and Opensearch 2.17.

Can we go with this approach of first updating the client and then updating the server?

What would be the best approach to do a rolling upgrade without down time.

I tried to find a documentation that gives a compatibility matrix but did not find it.
Found older topics Rest High Level Client compatibility mismatch in documentation but the pages they refer seem to have changed.

Configuration:

Relevant Logs or Screenshots:

Caused by: java.io.IOException: Unable to parse response body for Response{requestLine=PUT /quarantine-2025-01-09/_doc/aaf95bb4f3fdd274210d29b62fd3e641d24bbdb9100580020b364e1007f0e76b?timeout=1m HTTP/1.1, host=https://vpc-tf-email-quarantine-4tu2clbdgt45g6q4zgtbto7n2e.ap-south-1.es.amazonaws.com:443, response=HTTP/1.1 200 OK}
at org.opensearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1781)
at org.opensearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1728)
at org.opensearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1696)
at org.opensearch.client.RestHighLevelClient.index(RestHighLevelClient.java:961)
at com.sophos.xgemail.quarantine.dao.elasticsearch.QuarantineDaoImpl.save(QuarantineDaoImpl.java:158)
… 27 common frames omitted
Caused by: java.lang.NullPointerException: null
at java.base/java.util.Objects.requireNonNull(Objects.java:209)
at org.opensearch.action.DocWriteResponse.(DocWriteResponse.java:140)
at org.opensearch.action.index.IndexResponse.(IndexResponse.java:67)
at org.opensearch.action.index.IndexResponse.(IndexResponse.java:52)
at org.opensearch.action.index.IndexResponse$Builder.build(IndexResponse.java:120)
at org.opensearch.action.index.IndexResponse.fromXContent(IndexResponse.java:102)
at org.opensearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:2075)
at org.opensearch.client.RestHighLevelClient.lambda$performRequestAndParseEntity$8(RestHighLevelClient.java:1696)
at org.opensearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1779)
… 31 common frames omitted

Hi @balakrishnan ,

According to the following documentation, The OpenSearch 1.x high-level REST client works with the 1.x versions of OpenSearch.