mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-26 06:46:10 +00:00
With #29331 we added support for the cluster health API to the high-level REST client. The transport client does not support the level parameter, and it always returns all the info needed for shards level rendering. We have maintained that behaviour when adding support for cluster health to the high-level REST client, to ease migration, but the correct thing to do is to default the high-level REST client to `cluster` level, which is the same default as when going through the Elasticsearch REST layer.
20 lines
1.0 KiB
Plaintext
20 lines
1.0 KiB
Plaintext
[[breaking_70_restclient_changes]]
|
|
=== High-level REST client changes
|
|
|
|
==== API methods accepting `Header` argument have been removed
|
|
|
|
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. 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());`
|
|
|
|
==== Cluster Health API default to `cluster` level
|
|
|
|
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`. |