# High Level Rest Client client.inces().create(...) is deprecated

**URL:** <https://discuss.elastic.co/t/high-level-rest-client-client-inces-create-is-deprecated/225708>\
**Category:** Elasticsearch\
**Created:** [March 30, 2020, 4:09pm UTC](https://discuss.elastic.co/t/high-level-rest-client-client-inces-create-is-deprecated/225708 "2020-03-30T16:09:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cat](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@Cat](https://discuss.elastic.co/u/Cat)\
**Post date:** [March 30, 2020, 4:09pm UTC](https://discuss.elastic.co/t/high-level-rest-client-client-inces-create-is-deprecated/225708/1 "2020-03-30T16:09:02Z")

</div>

what is the replacement method for this?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 3, 2020, 4:23pm UTC](https://discuss.elastic.co/t/high-level-rest-client-client-inces-create-is-deprecated/225708/2 "2020-04-03T16:23:43Z")

</div>

Welcome!

You did not share your code so hard to tell.  
Wild guess is that you just need to add `, RequestOptions.DEFAULT);` as shown [in the documentation](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-create-index.html#java-rest-high-create-index-sync).

---

<div class="post-metadata">

**Author:** ![Cat](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@Cat](https://discuss.elastic.co/u/Cat)\
**Post date:** [April 3, 2020, 7:56pm UTC](https://discuss.elastic.co/t/high-level-rest-client-client-inces-create-is-deprecated/225708/3 "2020-04-03T19:56:49Z")

</div>

Perhaps I am not quite familiar with Elasticsearch REST APIs yet ...  
For example, the CreateIndexRequest come from 2 different packages:

org.elasticsearch.action.admin.indices.create.CreateIndexRequest  
org.elasticsearch.client.indices.CreateIndexRequest

So between the CreateIndexRequest, CreateIndexResponse and AcknowledgedResponse,  
I am all confused.

Thank you for your help. I got it working now

client.indices().create(request, RequestOptions.DEFAULT)  
.isAcknowledged()

---

<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:** [May 1, 2020, 7:56pm UTC](https://discuss.elastic.co/t/high-level-rest-client-client-inces-create-is-deprecated/225708/4 "2020-05-01T19:56:56Z")

</div>

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