Elasticsearch 7.0变化

Elasticsearch 7.0变化

1、官方文档

https://www.elastic.co/guide/en/elasticsearch/reference/7.x/index.html

https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html

2、High-level REST client 改变

(1)API methods accepting Header argument have been removed/已删除接受Header参数的API方法

All API methods accepting headers as a Header varargs argument, deprecated since 6.4, have been removed in favour of the newly introduced methods that accept instead a RequestOptions argument.
所有接受headers 作为Header varargs参数的API方法,自6.4以来已弃用,已被删除,以支持新引入的接受RequestOptions参数的方法。

In case you are not specifying any header, e.g. client.index(indexRequest) becomes client.index(indexRequest, RequestOptions.DEFAULT). In case you are specifying headers e.g. client.index(indexRequest, new Header(“name” “value”)) becomes client.index(indexRequest, RequestOptions.DEFAULT.toBuilder().addHeader(“name”, “value”).build());
如果您没有指定任何header,例如 client.index(indexRequest)变为client.index(indexRequest,RequestOptions.DEFAULT)。 如果您要指定header,例如 client.index(indexRequest, new Header("name" "value"))成为client.index(indexRequest, RequestOptions.DEFAULT.toBuilder().addHeader("name", "value").build());

(2)Cluster Health API default to cluster level /Cluster Health API默认为群集级别

The Cluster Health API used to default to shards level to ease migration from transport client that doesn’t support the level parameter and always returns information including indices and shards details. The level default value has been aligned with the Elasticsearch default level: cluster.
Cluster Health API用于默认为分片级别,以便于从不支持level参数的传输客户端迁移,并始终返回包括索引和分片详细信息在内的信息。 级别默认值已与Elasticsearch默认级别cluster对齐。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值