Skip to content

Commit 43b0c9c

Browse files
committed
Add note about inadvertent breakage for HLRC in 7.16 regarding indices options (elastic#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 elastic#77864
1 parent 7878577 commit 43b0c9c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/reference/migration/migrate_7_16.asciidoc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,30 @@ work with {es} 7.17.
102102
A more permanent solution is to
103103
{java-api-client}/migrate-hlrc.html[migrate from the (HLRC)] entirely.
104104
====
105+
106+
[[breaking_716_indices_options]]
107+
.The `ignore_throttled` parameter is deprecated and changes indices options sent to Elasticsearch
108+
[%collapsible]
109+
====
110+
*Details* +
111+
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.
112+
113+
*Impact* +
114+
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:
115+
116+
[source,java]
117+
----
118+
// Previously:
119+
highLevelClient.indices().exists(request, RequestOptions.DEFAULT);
120+
121+
// With indices options (change boolean options as needed):
122+
final var requestWithOptions = request.indicesOptions(IndicesOptions.fromOptions(false, false, true, false));
123+
highLevelClient.indices().exists(requestWithOptions, RequestOptions.DEFAULT);
124+
----
125+
126+
A more permanent solution is to
127+
{java-api-client}/migrate-hlrc.html[migrate from the (HLRC)] entirely.
128+
====
105129
// end::notable-breaking-changes[]
106130

107131
[discrete]

0 commit comments

Comments
 (0)