Does the latest version of Spring Data (2.1.0.RELEASE or 3.0.0M1) support Elasticsearch 5.x? If not, When will it support it?
There is no information about this in their docs: Spring Data 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.
The ElasticsearchTemplate class is deprecated as it uses the TransportClient to access Elasticsearch, which itself is deprecated since Elasticsearch version 7. + Users should switch to ElasticsearchRestTemplate or ReactiveElasticsearchTemplate .
Elasticsearch is built on top of Apache Lucene and was first released by Elasticsearch N.V. (now Elastic) in 2010. According to the website of Elastic, it is a distributed open-source search and analytics engine for all types of data, including textual, numerical, geospatial, structured, and unstructured.
ElasticSearch is well known as a search engine, also working well as document based NoSQL. Spring Data ElasticSearch adds basic Reactive support. Generate a project skeleton from Spring Intializr. Create a Post class to present a document in ElasticSearch, and add a @Document annotation on the class level.
Yes, now spring-data supports Elasticsearch v5.x. It's not supported with RELEASE version, it's supported with BUILD-SNAPSHOT version. To use it, you have to add repository URL as well. For maven project, build script will look something like-
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<version>3.0.0.BUILD-SNAPSHOT</version>
</dependency>
<repository>
<id>spring-libs-snapshot</id>
<name>Spring Snapshot Repository</name>
<url>http://repo.spring.io/libs-snapshot</url>
</repository>
For detail information, you can visit https://github.com/spring-projects/spring-data-elasticsearch
N.B. While writing this answer, latest version of elasticsearch and spring-data-elasticsearch was 5.4.2 and 3.0.0.BUILD-SNAPSHOT respectively. Those two were compatible.
Not support yet, you can try ES native java api.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With