Elastic Search高级客户端版本问题

时间:2019-11-14 21:34:46

标签: spring-boot elasticsearch elastic-stack

我正在使用Elastic Search 6.8.0

enter image description here

我的Spring Boot版本是v2.1.6.RELEASE 当我添加

   <dependency>
        <groupId>org.elasticsearch.client</groupId>
        <artifactId>elasticsearch-rest-high-level-client</artifactId>
    </dependency>

工作正常,在后台使用v6.4.3 v6.8.0也可以正常工作。

但是当我使用更高版本的客户端时,它不起作用,例如搜索等功能会出错, java.lang.NoSuchMethodError

谁能告诉我为什么我不能使用高于6.8.0的版本?如果我将ES Server升级到7+,代码会发生巨大变化吗?

1 个答案:

答案 0 :(得分:2)

客户端版本必须与集群版本兼容, https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.8/java-rest-high-compatibility.html

elastic 7.x进行了一些较大的更改,建议您在这里查看一下您使用的任何功能是否已更新:https://www.elastic.co/guide/en/elasticsearch/reference/7.0/release-notes-7.0.0.html