ElasticSearch 8.12.1 with HighLevelRestClient/JavaClient not working

I'm trying to use Elasticsearch 8.12.1 with the 7.17.18 HighLevelRestClient and the new 8.12.1 JavaClient.

I saw that for all the org.elasticsearch and org.elasticsearch.client artifacts there are now 8.12.1 versions except for the elasticsearch-rest-high-level-client. Am I supposed to use these versions together with the elasticsearch-rest-high-level-client 7.17.18 version or should I use for all the org.elasticsearch and org.elasticsearch.client artifacts the 7.17.18 versions?

When I use the 7.17.18 versions I get
java.lang.NoSuchMethodError: 'org.elasticsearch.client.RequestOptions$Builder org.elasticsearch.client.RequestOptions$Builder.setHttpAsyncResponseConsumerFactory(org.elasticsearch.client.HttpAsyncResponseConsumerFactory)'

When I use the 8.12.1 versions there are a lot of changes/omissions in the aggregations. AutoDateHistogramBuilder is not present, movingFuncton and normalize is missing... Even when doing a simple connect I get that the class org.elasticsearch.action.admin.indices.flush.SyncedFlushRequest is not found.

I am a bit desperate at the moment. All help is greatly appreciated.

Meanwhile after some further investigation I got things to work with an older version of the JavaClient. When I am using the 7.17.18 artifacts for all the org.elasticsearch and org.elasticsearch.client artifacts and the 8.11.4 version for the co.elastic.clients elasticsearch-java artifact I can connect without problems. If I use version 8.12.1 I get java.lang.NoSuchMethodError: 'org.elasticsearch.client.RequestOptions$Builder org.elasticsearch.client.RequestOptions$Builder.setHttpAsyncResponseConsumerFactory(org.elasticsearch.client.HttpAsyncResponseConsumerFactory)'

Should I file a bug or am i doing something wrong?

Have a look at

It contains a lot of examples.

Here I think you are trying to mix 2 different versions of the same lib.

 dependency:tree 

Should help to clarify

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