Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Spring Data Elasticsearch support Amazon Elasticsearch?

From the research I have done it seems that the two do not work together because of HTTP only support for Amazon Elasticsearch.

Hoping someone can clarify if in fact it is not something that is possible with Spring Data Elasticsearch.

like image 651
code Avatar asked Nov 30 '15 23:11

code


People also ask

Does spring data support Elasticsearch?

The Spring Data Elasticsearch project provides integration with the Elasticsearch search engine. Key functional areas of Spring Data Elasticsearch are a POJO centric model for interacting with a Elastichsearch Documents and easily writing a Repository style data access layer.

Does Amazon search use Elasticsearch?

To make it easy for customers to run open-source Elasticsearch, AWS offers Amazon OpenSearch Service to perform interactive log analytics, real-time application monitoring, website search, and more. To learn more about OpenSearch and the ways to operationalize it, please click here.

What is Elasticsearch in spring?

We'll learn how to index, search, and query Elasticsearch in a Spring application using Spring Data Elasticsearch. Spring Data Elasticseach is a Spring module that implements Spring Data, thus offering a way to interact with the popular open-source, Lucene-based search engine.


1 Answers

Looks like Spring data elastic search from version 3.2.0 works with http rest client, so it is possible to connect to aws elastic instance through Rest API and port 443. Somehow they integrated spring-data-jest approach into spring data. I use RestHighLevelClient:

    @Bean
    public RestHighLevelClient client() {
        return new RestHighLevelClient(RestClient.builder(HttpHost.create(awsUrl)));
    }

awsUrl format is: https://some_aws_generated_address.us-east-n.es.amazonaws.com:443

NOTE: If you are using spring boot with default bom.xml, you need to upgrade spring boot to 2.2.1.RELEASE or newer

like image 72
Volodymyr Kret Avatar answered Sep 23 '22 05:09

Volodymyr Kret