From 43b0c9c097f200c1c9e53078a0d3c202a4bea16e Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Tue, 23 Aug 2022 14:14:57 -0600 Subject: [PATCH] Add note about inadvertent breakage for HLRC in 7.16 regarding indices options (#89469) This adds a note about an unintended break in behavior for the HLRC with regard to the indices options that are sent by default with requests. Relates to #77864 --- .../reference/migration/migrate_7_16.asciidoc | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/reference/migration/migrate_7_16.asciidoc b/docs/reference/migration/migrate_7_16.asciidoc index 6491e9a45a484..e78fc829c51f1 100644 --- a/docs/reference/migration/migrate_7_16.asciidoc +++ b/docs/reference/migration/migrate_7_16.asciidoc @@ -102,6 +102,30 @@ work with {es} 7.17. A more permanent solution is to {java-api-client}/migrate-hlrc.html[migrate from the (HLRC)] entirely. ==== + +[[breaking_716_indices_options]] +.The `ignore_throttled` parameter is deprecated and changes indices options sent to Elasticsearch +[%collapsible] +==== +*Details* + +In https://github.com/elastic/elasticsearch/pull/77864[#77864] the High Level Rest Client was changed to only send indices options if the request differed from the default request options. However, in some cases the default options for the HLRC request object inadvertently differ from the effective options of the {es} APIs, meaning that it is possible for the API response to differ. + +*Impact* + +If you use the HLRC and have a differing response due to indices options, you can update the options using the `indicesOptions(...)` method, as shown below: + +[source,java] +---- +// Previously: +highLevelClient.indices().exists(request, RequestOptions.DEFAULT); + +// With indices options (change boolean options as needed): +final var requestWithOptions = request.indicesOptions(IndicesOptions.fromOptions(false, false, true, false)); +highLevelClient.indices().exists(requestWithOptions, RequestOptions.DEFAULT); +---- + +A more permanent solution is to +{java-api-client}/migrate-hlrc.html[migrate from the (HLRC)] entirely. +==== // end::notable-breaking-changes[] [discrete]