restclient.asciidoc 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. [float]
  2. [[breaking_70_restclient_changes]]
  3. === High-level REST client changes
  4. [float]
  5. ==== API methods accepting `Header` argument have been removed
  6. All API methods accepting headers as a `Header` varargs argument, deprecated
  7. since 6.4, have been removed in favour of the newly introduced methods that
  8. accept instead a `RequestOptions` argument. In case you are not specifying any
  9. header, e.g. `client.index(indexRequest)` becomes
  10. `client.index(indexRequest, RequestOptions.DEFAULT)`.
  11. In case you are specifying headers
  12. e.g. `client.index(indexRequest, new Header("name" "value"))` becomes
  13. `client.index(indexRequest, RequestOptions.DEFAULT.toBuilder().addHeader("name", "value").build());`
  14. [float]
  15. ==== Cluster Health API default to `cluster` level
  16. The Cluster Health API used to default to `shards` level to ease migration
  17. from transport client that doesn't support the `level` parameter and always
  18. returns information including indices and shards details. The level default
  19. value has been aligned with the Elasticsearch default level: `cluster`.
  20. === Low-level REST client changes
  21. [float]
  22. ==== Support for `maxRetryTimeout` removed from RestClient
  23. `RestClient` and `RestClientBuilder` no longer support the `maxRetryTimeout`
  24. setting. The setting was removed as its counting mechanism was not accurate
  25. and caused issues while adding little value.