Does Spring Data support Elasticsearch 5.x?

帅比萌擦擦* 提交于 2020-01-14 09:52:26

问题


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


回答1:


Not support yet, you can try ES native java api.




回答2:


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.



来源:https://stackoverflow.com/questions/42001828/does-spring-data-support-elasticsearch-5-x

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