# Regression: Client 7.16.x IndicesClient.exists indicesOptions are not present in request anymore

**URL:** <https://discuss.elastic.co/t/regression-client-7-16-x-indicesclient-exists-indicesoptions-are-not-present-in-request-anymore/298017>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [February 23, 2022, 11:25am UTC](https://discuss.elastic.co/t/regression-client-7-16-x-indicesclient-exists-indicesoptions-are-not-present-in-request-anymore/298017 "2022-02-23T11:25:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastian\_Bathke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebastian_bathke/32/98859_2.png) [@Sebastian\_Bathke](https://discuss.elastic.co/u/Sebastian_Bathke)\
**Post date:** [February 23, 2022, 11:25am UTC](https://discuss.elastic.co/t/regression-client-7-16-x-indicesclient-exists-indicesoptions-are-not-present-in-request-anymore/298017/1 "2022-02-23T11:25:56Z")

</div>

Hey folks,

we encountered a regression when updating to the latest 7.16.3 Java client, still making use of the RestHighLevelClient.

The main cause for the issue is that actually the GetIndexRequest.DEFAULT\_INDICES\_OPTIONS setup:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/e/6e676a3b9d5053f72b3da45d5b4bc82558f965c9.png)  
doesn't match the server defaults as of:

> **[Exists API | Elasticsearch Guide \[7.16\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.16/indices-exists.html#indices-exists-api-query-params)**

The main mismatches are:

- allowNoIndices:  
server default=true  
client default=false
- expandToClosedIndices  
server default=false  
client default=true

In the past this hasn't caused any trouble as the client defaults were just always sent to the server. However since [Deprecate ignore\_throttled parameter by martijnvg · Pull Request #77479 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/pull/77479/files#diff-c3fe25d9a0568cf906d63bc311c95c21f7042e21769d00d9969da13ae6ccdadaR423-R425) they are not sent in case the current requests options equal the defaults of the GetIndexRequest.

Given that server and client defaults are not equal, the behaviour of the `IndicesClient.exists` thus changed when updating to 7.16.x.

I understand that the RestHighLevelClient is deprecated already though, we will work around for the time being by using a custom options config to fix the regression we experienced.  
I still wonder if you may consider it worth evaluating whether the previous default behaviour can be restored 🙂

I haven't checked the behaviour of the new client yet.

Best  
Sebastian

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 23, 2022, 11:26am UTC](https://discuss.elastic.co/t/regression-client-7-16-x-indicesclient-exists-indicesoptions-are-not-present-in-request-anymore/298017/2 "2022-03-23T11:26:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
