I want to use Java API client provided by ElasticSearch but I don't know if it would be compatible with my cluster.
I saw there was ElasticSearch High Level REST client which has been deprecated for the new Java API client. I could find information about what ES cluster would the High level REST client support but none regarding the new Java API client. Can someone point me in the right direction?
Compatibility information for high level REST client: https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.8/java-rest-high-compatibility.html
This section is missing for the new Java API client
You need to use Java High Level Client only because New Java Client support only forward compatible, below is what mentioned in documentation.
The Elasticsearch Java client is forward compatible; meaning that the client supports communicating with greater or equal minor versions of Elasticsearch. Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made.
However, You can use Java high level client with Elasticsearch 8.x version with compatibility mode enabled.