Java connection help to OpenSearch

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Java 8
Opensearch 2.4.0

Describe the issue:
I’m unable to connect to my OpenSearch cluster due to versions compatibilities. I think this is because OpenSearch 2.0 does not have support for Java 8 but what is the alternative.

How do I connect my java 8 application to OpenSearch

Configuration:
public OpenSearchClient getClient() {
SdkHttpClient httpClient = ApacheHttpClient.builder().build();
return new OpenSearchClient(
new AwsSdk2Transport(
httpClient,
host,
“es”,
Region.of(region),
AwsSdk2TransportOptions.builder().build()
)
);
}

This does not compile

Is there any way you can run this in a higher version of java?

Here’s the status on java 8 support in opensearch-java:

Feel free to participate or comment in that issue.

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