I am in a situation where I am using Spring boot and AWS elasticsearch service. AWS Elasticsearch service which only provides REST interface.
Elasticsearch Rest Clie
Can't comment on Przemek Nowak's answer above. If you don't want to wait for Spring Data ES 2.2.x to use the High Level Rest Client, then Spring Data Jest saves the day.
As per their documentation, you first disable the default Spring Data ES autoconfiguration:
@SpringBootApplication(exclude = {
ElasticsearchAutoConfiguration.class,
ElasticsearchDataAutoConfiguration.class
})
And that's it - the repositories will now use Jest's implementation. And if you'd like to use the ElasticsearchTemplate, make sure you inject ElasticsearchOperations interface instead:
private final ElasticsearchOperations esTemplate;