Spring Boot Integration

Elastic search has support in Spring Boot but now we can not use opensearch with spring boot. Is there any work going on spring boot integration.

Hey @harshit , see please / comment [1] and [2], thank you

[1] https://github.com/spring-projects/spring-data-elasticsearch/issues/1853
[2] https://github.com/spring-projects/spring-data-elasticsearch/issues/1918

these are issues from Spring Data Elasticsearch. Spring Boot is something different.

@sothawo correct, but isn’t Spring Data Elasticsearch the one that provides integration with Elasticseach and Opensearch (up to the point) for Spring & Spring Boot applications? At least my way of thinking :smiley: but you are right, more context would be helpful.

Spring Data (Spring Data) provides a consistent approach to storing and retrieving data in different datastores like JPA based ones, MongoDB, Elasticsearch, Neo4J and other modules. They have in common that they define operations to be performed on a store, provide templates that implement these operations and offer repositories with CRUD operations. Spring Data modules can be used independently from Spring Boot, they can even work without Spring in a CDI environment.

Spring Data Elasticsearch is the module that offers these things with Elasticsearch as the underlying store. Besides the initial configuration the user does not need to do anything with Elasticsearch specific classes - that some users only take the (currently) RestHighLevelClient which can be easily configured in Spring Data Elasticsearch and then do not use any other of the features provided by Spring Data Elasticsearch is a different story.

Spring Data Elasticsearch is a community-maintained project that is distributed by VMware, but they do not maintain it.

Spring Boot offers different autoconfiguration options to integrate with Elasticsearch. The first is the integration to provide the Elasticsearch client to the user, that is independent of Spring Data Elasticsearch. The second is the integration and autoconfiguration of Spring Data Elasticsearch if it is on the classpath.

So what clients they support is out of scope for Spring Data Elasticsearch.

I think the spring-data-opensearch library would work with Spring Boot. Please explain if that’s not true.