# Close Index Api warning in ES version 6.8

**URL:** <https://discuss.elastic.co/t/close-index-api-warning-in-es-version-6-8/256662>\
**Category:** Elasticsearch\
**Created:** [November 25, 2020, 1:28pm UTC](https://discuss.elastic.co/t/close-index-api-warning-in-es-version-6-8/256662 "2020-11-25T13:28:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrudrego](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@mrudrego](https://discuss.elastic.co/u/mrudrego)\
**Post date:** [November 25, 2020, 1:28pm UTC](https://discuss.elastic.co/t/close-index-api-warning-in-es-version-6-8/256662/1 "2020-11-25T13:28:59Z")

</div>

Hi,

There is a warning in Elasticsearch 6.8 version [document](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-open-close.html) about Close index api which states

> To reduce the risk of data loss, avoid keeping closed indices in your cluster for long periods of time. When a node leaves your cluster, Elasticsearch does not rebuild the lost copies of the shards in any closed indices. As you replace the nodes in your cluster over time you will gradually lose the shard data for any closed indices

While this warning is not visible in 7.x version of Close Index API [document](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-open-close.html).  
Can you please let us know if the above issue of keeping closed indices for long time is solved in 7.x versions of Elasticsearch ?

Thanks,

.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 30, 2020, 4:53am UTC](https://discuss.elastic.co/t/close-index-api-warning-in-es-version-6-8/256662/2 "2020-11-30T04:53:42Z")

</div>

From the 7.X documentation;

> The data of opened/closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times.

---

<div class="post-metadata">

**Author:** ![mrudrego](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@mrudrego](https://discuss.elastic.co/u/mrudrego)\
**Post date:** [November 30, 2020, 7:29am UTC](https://discuss.elastic.co/t/close-index-api-warning-in-es-version-6-8/256662/3 "2020-11-30T07:29:32Z")

</div>

Thanks for the reply.

So this means, there won't be any risk of data loss if a closed index is kept for a long time and a node leaves the cluster?

One more add on question to this, the number of shard copies of closed indices that are safely kept are same as the number of replicas configured for the index ?

Thanks,

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 30, 2020, 7:55am UTC](https://discuss.elastic.co/t/close-index-api-warning-in-es-version-6-8/256662/4 "2020-11-30T07:55:47Z")

</div>

> [@mrudrego](#):
>
> One more add on question to this, the number of shard copies of closed indices that are safely kept are same as the number of replicas configured for the index ?

That doesn't make sense to me sorry, can you rephrase it?

---

<div class="post-metadata">

**Author:** ![mrudrego](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@mrudrego](https://discuss.elastic.co/u/mrudrego)\
**Post date:** [November 30, 2020, 8:22am UTC](https://discuss.elastic.co/t/close-index-api-warning-in-es-version-6-8/256662/5 "2020-11-30T08:22:20Z")

</div>

Hi,  
As referenced, the document in 7.x says

> The data of opened/closed indices is automatically replicated by the cluster to ensure that **enough shard copies** are safely kept around at all times.

According to this, even the shards of closed indices are also replicated/copied. So wanted to know if the number of replica/copies of these closed indices remains same as index.number\_of\_replicas settings configured ?

Thanks,

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 30, 2020, 7:24pm UTC](https://discuss.elastic.co/t/close-index-api-warning-in-es-version-6-8/256662/6 "2020-11-30T19:24:29Z")

</div>

I haven't tested it myself, but that would make sense.

---

<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:** [December 28, 2020, 7:24pm UTC](https://discuss.elastic.co/t/close-index-api-warning-in-es-version-6-8/256662/7 "2020-12-28T19:24:33Z")

</div>

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