# About Elasticsearch Reference \[5.6\] » Document APIs » Index API

**URL:** <https://discuss.elastic.co/t/about-elasticsearch-reference-5-6-document-apis-index-api/103934>\
**Category:** Elasticsearch\
**Created:** [October 13, 2017, 4:55pm UTC](https://discuss.elastic.co/t/about-elasticsearch-reference-5-6-document-apis-index-api/103934 "2017-10-13T16:55:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![R00082](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@R00082](https://discuss.elastic.co/u/R00082)\
**Post date:** [October 13, 2017, 4:55pm UTC](https://discuss.elastic.co/t/about-elasticsearch-reference-5-6-document-apis-index-api/103934/1 "2017-10-13T16:55:36Z")

</div>

hi  
in the link [https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docs-index\_.html#index-wait-for-active-shards](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docs-index_.html#index-wait-for-active-shards)

For example, suppose we have a cluster of three nodes, A, B, and C and we create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes). If we attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding. This means that even if B and C went down, and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data. If wait\_for\_active\_shards is set on the request to 3 (and all 3 nodes are up), then the indexing operation will require 3 active shard copies before proceeding, a requirement which should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard. However, if we set wait\_for\_active\_shards to all (or to 4, which is the same), the indexing operation will not proceed as we do not have all 4 copies of each shard active in the index. The operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard

the desc above  
are there 3 nodes and 1 primary shard 3 replicas shards  
eg:  
A node: 1 primary shard + 3rd replicas shard  
B node: 1 st replicas shard  
c node: 2 sec replicas shard  
if we set wait\_for\_active\_shards to all (or to 4, which is the same,and all 3 nodes are up)  
is not the active node 4?  
I think that the indexing operation will proceed  
would you confirm it? is the document error?

---

<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:** [November 10, 2017, 4:55pm UTC](https://discuss.elastic.co/t/about-elasticsearch-reference-5-6-document-apis-index-api/103934/2 "2017-11-10T16:55:40Z")

</div>

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