【发布时间】:2022-01-02 00:32:16
【问题描述】:
通过spring data jpa从elasticsearch搜索数据时出现以下错误
23-11-2021 19:51:20.699 [http-nio-8990-exec-2] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is ElasticsearchStatusException[Elasticsearch exception [type=illegal_argument_exception, reason=request [/dummy/_doc/_search] contains unrecognized parameter: [ccs_minimize_roundtrips]]]] with root cause
这是我的 maven 依赖项
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
<version>2.2.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<version>3.2.3.RELEASE</version>
</dependency>
我认为 ES 服务器版本和 api 版本相同,但我仍然收到此错误。
注意这不是重复的,因为即使在旧版本中我也会收到此错误
【问题讨论】:
-
3.2.3 spring-data-elasticsearch 版本requires Elastic 6.8.12。你能具体告诉我们你运行的是哪个 ES 版本吗?
-
请出示您用于查询的代码
-
@Val 手动添加 elasticsearch 6.7.1 后,我遇到了几个错误,但随后添加了 elasticsearch-rest-client 6.8.4 和 elasticsearch-rest-high-level-client 6.8.4,现在可以正常工作。您可以将此添加为答案
标签: spring-boot elasticsearch spring-data-elasticsearch