Amit Singh
Amit Singh

Reputation: 49

Spring Data Elasticsearch with RestHighLevelClient for ES version 6.0.1

We have an application that uses spring data Elasticsearch (version 3.1.20.RELEASE) with transport client to connect to elastic search version 6.1.2.

Now we have to use the same application to connect to elastic search version 6.0.1 which is AWS-managed ES. The problem is, it doesn't seem to expose transport ports (9300) for clients.

If we move to a higher version of spring data Elasticsearch, it doesn't seem to support the elastic search cluster 6.0.x, and the current and lower versions of spring data Elasticsearch don't seem to support the REST clients.

We cannot upgrade our ES cluster version. So, either we have to find a way to connect to AWS with the transport client, or we have to make our application compatible with rest client. How can we solve this?

Upvotes: 1

Views: 210

Answers (1)

Abacus
Abacus

Reputation: 19421

AWS does not expose the transport port / protocol. So you must use the REST protocol. And for Spring Data Elasticsearch that means version 3.2 at least. But this needs Elasticsearch 6.8. So the only way to use Spring Data Elasticsearch is to upgrade your ES cluster.

The other solution is to implement access the the cluster with Elasticsearch's RestClient and RestHighlevelClient and not using Spring data Elasticsearch

Upvotes: 1

Related Questions