Skip to content

Add note about inadvertent breakage for HLRC in 7.16 regarding indices options #89469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/reference/migration/migrate_7_16.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down