Java API client 8.x with Elasticsearch 7.x

Some additional details: if you're in a scenario with mixed 7.x and 8.x Elasticsearch server, using the Java API client 8.x may work with Elasticsearch server 7.x.

However, you will get better compatibility using the Java API client 7.x with Elasticsearch 8.x. The Java API client 7.x will send the necessary headers so that Elasticsearch server 8.x works in 7.x compatible mode.

1 Like