繁体   English   中英

如何修复 [删除类型] 在搜索请求中指定类型已弃用。”](elasticsearch 7.4.0、spring 启动 2.2.6)?

[英]How to fix [types removal] Specifying types in search requests is deprecated."] (elasticsearch 7.4.0 ,spring boot 2.2.6)?

I'm developing my first application that uses elasticsearch (7.4.0) as database and I use for that spring data elasticsearch ( spring boot version is 2.2.6),every thing is working fine but I still get the following warning logs messages when我运行我的应用程序。

Using include_type_name in put mapping requests is deprecated. The parameter will be removed in the next major version."]
[types removal] Specifying types in search requests is deprecated."]

我知道自 7.0.0 版本以来的类型删除,但我该如何解决,我的意思是我应该更改我的 spring 启动版本还是我的 elasticsearch 版本,我怎样才能删除这些警告消息? 忽略这些警告会影响申请流程吗?

Spring 引导 2.2.6 引入 Spring 数据 Elasticsearch 3.2。 以及版本 6.8.7 中的 Elasticsearch 客户端库。 This cannot work with an Elasticsearch cluster running version 7. You will need the Elasticsearch client libraries in at least version 7.4.0 and Spring Data Elasticsearch in version 4.0

你可以做两件事:

  1. Explicitly specify the versions of Spring Data (realease train Neumann contains Spring Data Elasticsearch 4.0) and Elasticsearch to use by setting the properties in your pom.xml see the documentation :
    <properties>
        <elasticsearch.version>7.4.0</elasticsearch.version>
        <spring-data-releasetrain.version>Neumann-RELEASE</spring-data-releasetrain.version>
    </properties>
  1. 使用 Spring 引导 2.3。 这将拉入与上述相同版本的 Spring 数据和版本 7.6 中的 Elasticsearch 客户端库 - 这将与您的 7.4 集群一起使用。

我更喜欢使用第二个。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM