# Missing index setting in the new Java Client

**URL:** <https://discuss.elastic.co/t/missing-index-setting-in-the-new-java-client/294739>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [January 18, 2022, 9:19pm UTC](https://discuss.elastic.co/t/missing-index-setting-in-the-new-java-client/294739 "2022-01-18T21:19:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdrossl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jdrossl/32/100494_2.png) [@jdrossl](https://discuss.elastic.co/u/jdrossl)\
**Post date:** [January 18, 2022, 9:19pm UTC](https://discuss.elastic.co/t/missing-index-setting-in-the-new-java-client/294739/1 "2022-01-18T21:19:03Z")

</div>

Hi everyone!

I'm working on a migration from the RHLC to the new Java Client and most of it went fine but it seems like there is a whole section missing for Index Settings (index.mapping.\*) is this intentional or something that will be included in a future release?

These are the settings I need to include in the request [Mapping limit settings | Elasticsearch Guide [7.16] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.16/mapping-settings-limit.html)

And this is the class where I think those settings should be [elasticsearch-java/IndexSettings.java at 7.16 · elastic/elasticsearch-java · GitHub](https://github.com/elastic/elasticsearch-java/blob/7.16/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexSettings.java)

I'm working on 7.16 but 7.17 & 8 look the same

Thanks

---

<div class="post-metadata">

**Author:** ![linkerc](https://avatars.discourse-cdn.com/v4/letter/l/13edae/32.png) [@linkerc](https://discuss.elastic.co/u/linkerc)\
**Post date:** [January 18, 2022, 9:52pm UTC](https://discuss.elastic.co/t/missing-index-setting-in-the-new-java-client/294739/2 "2022-01-18T21:52:58Z")

</div>

I think you just need to add to the mapping.

> **[Create Index API | Java REST Client \[7.15\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.15/java-rest-high-create-index.html)**

---

<div class="post-metadata">

**Author:** ![jdrossl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jdrossl/32/100494_2.png) [@jdrossl](https://discuss.elastic.co/u/jdrossl)\
**Post date:** [January 18, 2022, 11:02pm UTC](https://discuss.elastic.co/t/missing-index-setting-in-the-new-java-client/294739/3 "2022-01-18T23:02:22Z")

</div>

hi linkerc, the doc you mentioned is for the Rest High Level Client but I'm migrating to the new Java API Client

> **[Elasticsearch Java API Client \[7.16\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/index.html)**

---

<div class="post-metadata">

**Author:** ![swallez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swallez/32/11972_2.png) [@swallez](https://discuss.elastic.co/u/swallez)\
**Post date:** [January 20, 2022, 10:18am UTC](https://discuss.elastic.co/t/missing-index-setting-in-the-new-java-client/294739/4 "2022-01-20T10:18:43Z")

</div>

@jdrossl this is definitely not intentional. The [API specification](https://github.com/elastic/elasticsearch-specification) used to generate the new Java API client is incomplete in that area and we're improving it. Index settings will have more complete coverage in future revisions.

In the meantime, you can [use the old and new clients side by side](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/migrate-hlrc.html).

---

<div class="post-metadata">

**Author:** ![linkerc](https://avatars.discourse-cdn.com/v4/letter/l/13edae/32.png) [@linkerc](https://discuss.elastic.co/u/linkerc)\
**Post date:** [January 20, 2022, 11:02pm UTC](https://discuss.elastic.co/t/missing-index-setting-in-the-new-java-client/294739/5 "2022-01-20T23:02:27Z")

</div>

hmmm. I didn't realize there's such a thing. What's the benefit of API client vs rest client?

---

<div class="post-metadata">

**Author:** ![WEI\_GUO](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wei_guo/32/100652_2.png) [@WEI\_GUO](https://discuss.elastic.co/u/WEI_GUO)\
**Post date:** [January 21, 2022, 12:26am UTC](https://discuss.elastic.co/t/missing-index-setting-in-the-new-java-client/294739/6 "2022-01-21T00:26:59Z")

</div>

The new client is independent from the Elasticsearch server code.

---

<div class="post-metadata">

**Author:** ![jdrossl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jdrossl/32/100494_2.png) [@jdrossl](https://discuss.elastic.co/u/jdrossl)\
**Post date:** [January 21, 2022, 2:19pm UTC](https://discuss.elastic.co/t/missing-index-setting-in-the-new-java-client/294739/7 "2022-01-21T14:19:06Z")

</div>

@swallez thanks for the response, it would be helpful if there is a ticket or any other way to track the coverage of the API

---

<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:** [February 18, 2022, 2:19pm UTC](https://discuss.elastic.co/t/missing-index-setting-in-the-new-java-client/294739/8 "2022-02-18T14:19:14Z")

</div>

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