Rest client for Elastic 6.2.x and 7.2.x

Hi , We have a sbt project which need to query both elasticsearch 6.2 cluster using sksamuel/elastic4s as well as Elasticsearch 7.2.0 using the bight level rest client for elasticsearch. I am getting errors as there is a dependency that gets overwritten with either 6 or 7 version of rest client for elasticsearch.
java.lang.NoSuchMethodError: org.elasticsearch.client.RestClient.performRequestAsync(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Lorg/apache/http/HttpEntity;Lorg/elasticsearch/client/ResponseListener;[Lorg/apache/http/Header;)V
[error] sbt.ForkMain$ForkError: java.lang.NoSuchMethodError: org.elasticsearch.client.RestClient.performRequestAsync(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Lorg/apache/http/HttpEntity;Lorg/elasticsearch/client/ResponseListener;[Lorg/apache/http/Header;)V

Upon investing so much time, i realised that there is no shading option available for sbt for scala code in intellij. Is it possible to use any of the rest client which can work for both of these in same project?

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