Compatible versions of Spring boot,elasticsearch and spring data elasticsearch

倾然丶 夕夏残阳落幕 提交于 2019-12-20 01:59:14

问题


I have been developing a simple java programming using spring boot,elastic search and spring data elastic search.

I am able to do the elastic search successfully with below versions 1) spring boot 1.3.5 2) spring-data-elasticsearch 1.3.4.RELEASE 3) elasticsearch 1.3.2

but when i upgraded to the below versions,one of my service class annotated with @service annotation showing error as

"The type org.elasticsearch.search.suggest.SuggestBuilder$SuggestionBuilder cannot be resolved. It is indirectly referenced from required .class files".

     1) spring boot 1.5.1.RELEASE
     2) spring-data-elasticsearch 2.1.0.RELEASE
     3) elasticsearch 5.0.1
     4) org.elasticsearch.client.transport 5.1.1

is it the issue with incompatible verions? if yes,please help me what is the compatible versions of spring boot,elasticsearch and spring data elasticsearch.


回答1:


There isn't a compatible set of versions as Spring Data Elasticsearch doesn't support Elasticsearch 5.0 yet. See this issue that's tracking some of the work to support 5.0.

Generally speaking, rather than trying to find compatible versions yourself, you should let Spring Boot's dependency management take care of that for you. If you are overriding that dependency management to use a new major version of a dependency, there is a very good chance that it won't work.




回答2:


Spring Data ES 3.0.0M4 release is compatible with ES 5.0 - Ref - DATAES-285



来源:https://stackoverflow.com/questions/42135906/compatible-versions-of-spring-boot-elasticsearch-and-spring-data-elasticsearch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!