I'm using Elasticsearch 7.1.0 and I want to create a spring-boot application and connect with elasticsearch using spring-data-elastic-search. But I have not found a solution to use query and aggregation.
3 Answers
Unfortunately, spring data elasticsearch does not support version 7.1.0 yet. See versions section in this link:
https://github.com/spring-projects/spring-data-elasticsearch
You could see if it it works by connecting to this version but it wouldn't be a supported solution. The best suggestion would be to use a version of elasticsearch that is supported by spring data elasticsearch e.g. elasticsearch 3.2.x supports version 6.7.2 of elasticsearch. This should work fine then.
I have created a dummy rest-api project using spring boot and elasticsearch-data. You can take the reference from here-
https://github.com/haritmaljhain/working-api.git
If you have any issue, let me know.
It will be possible, after spring-data-elasticsearch:4.0.0
was released, but there is not even a milestone for that. The newest spring-boot version 2.2.1
with the corresponding starter for data-elasticsearch
uses spring-data-elasticsearch:3.2.1
Until 4.0.0 is released, you can use the following workaround:
How to integrate ElasticSearch 7.0 version with Spring Boot?