# Response after create new index

**URL:** <https://discuss.elastic.co/t/response-after-create-new-index/363676>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [July 24, 2024, 7:05am UTC](https://discuss.elastic.co/t/response-after-create-new-index/363676 "2024-07-24T07:05:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scorp](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@Scorp](https://discuss.elastic.co/u/Scorp)\
**Post date:** [July 24, 2024, 7:05am UTC](https://discuss.elastic.co/t/response-after-create-new-index/363676/1 "2024-07-24T07:05:37Z")

</div>

When i create new index the **response** contains like this

```auto
{
  "acknowledged": true,
  "shards_acknowledged": true,
  "index": "my-index"
}

```

My question is about of tihis response keywords, what do these three keywords mean, respectively? For example, what should I understand from the response shards\_acknowledged: true?

---

<div class="post-metadata">

**Author:** ![Kathleen\_DeRusso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kathleen_derusso/32/132039_2.png) [@Kathleen\_DeRusso](https://discuss.elastic.co/u/Kathleen_DeRusso)\
**Post date:** [July 24, 2024, 12:05pm UTC](https://discuss.elastic.co/t/response-after-create-new-index/363676/2 "2024-07-24T12:05:22Z")

</div>

Hi there @Scorp, our [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#create-index-wait-for-active-shards) has the following explanation:

> `acknowledged` indicates whether the index was successfully created in the cluster, while `shards_acknowledged` indicates whether the requisite number of shard copies were started for each shard in the index before timing out. Note that it is still possible for either `acknowledged` or `shards_acknowledged` to be `false` , but the index creation was successful. These values simply indicate whether the operation completed before the timeout. If `acknowledged` is `false` , then we timed out before the cluster state was updated with the newly created index, but it probably will be created sometime soon. If `shards_acknowledged` is `false` , then we timed out before the requisite number of shards were started (by default just the primaries), even if the cluster state was successfully updated to reflect the newly created index (i.e. `acknowledged=true` ).

---

<div class="post-metadata">

**Author:** ![Scorp](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@Scorp](https://discuss.elastic.co/u/Scorp)\
**Post date:** [July 24, 2024, 6:34pm UTC](https://discuss.elastic.co/t/response-after-create-new-index/363676/3 "2024-07-24T18:34:20Z")

</div>

I understand perfectly. But after i read your anwser new question appeared my mind. Why we do have to have a time to create index and its shards? Why we do not wait for index to be created?

---

<div class="post-metadata">

**Author:** ![Kathleen\_DeRusso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kathleen_derusso/32/132039_2.png) [@Kathleen\_DeRusso](https://discuss.elastic.co/u/Kathleen_DeRusso)\
**Post date:** [July 24, 2024, 7:17pm UTC](https://discuss.elastic.co/t/response-after-create-new-index/363676/4 "2024-07-24T19:17:07Z")

</div>

If you refer to the documentation I linked previously, you'll see that you can use `wait_for_active_shards`.

---

<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:** [August 21, 2024, 7:17pm UTC](https://discuss.elastic.co/t/response-after-create-new-index/363676/5 "2024-08-21T19:17:36Z")

</div>

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