# \_cat/indices response explanation for replica shards

**URL:** <https://discuss.elastic.co/t/cat-indices-response-explanation-for-replica-shards/247447>\
**Category:** Elasticsearch\
**Created:** [September 3, 2020, 7:57pm UTC](https://discuss.elastic.co/t/cat-indices-response-explanation-for-replica-shards/247447 "2020-09-03T19:57:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sha1](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@sha1](https://discuss.elastic.co/u/sha1)\
**Post date:** [September 3, 2020, 7:57pm UTC](https://discuss.elastic.co/t/cat-indices-response-explanation-for-replica-shards/247447/1 "2020-09-03T19:57:01Z")

</div>

The `_cat/indices` endpoint returns primary shard count and replica factor, e.g.

```auto
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open hioqqain.local.dev Z364S_RLSjiQF6cK_45Vcg 4 1 100 23 233.1kb 233.1kb
yellow open hioqqain.local.dev 0zCVSdGeSsS-zKBu-fTE8Q 4 1 0 0 1.1kb 1.1kb

```

But the help says they should be shard count,

```auto
pri | p,shards.primary,shardsPrimary | number of primary shards                                                                                         
rep | r,shards.replica,shardsReplica | number of replica shards

```

Is the help wrong in this case?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 3, 2020, 8:22pm UTC](https://discuss.elastic.co/t/cat-indices-response-explanation-for-replica-shards/247447/2 "2020-09-03T20:22:50Z")

</div>

Hi @sha1 Welcome to the community.

> **[cat indices API | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html)**

To calculate the total number or shard in an index it is

Total Number of Shared = Number of Primary Shards \* (Number of Replicas + 1) #The 1 is the primary shard so there are actually 2 copies of the data.

So for Above

> [@sha1](#):
>
> ```auto
> health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
> yellow open hioqqain.local.dev Z364S_RLSjiQF6cK_45Vcg 4 1 100 23 233.1kb 233.1kb
> 
> ```

Total Shards for `hioqqain.local.dev` = 4 Primary Shards \* Replicas (1Rep +1Pri) = 8 total Shards

Thats the math

You can see all the shards

`GET /_cat/shards/?v`

---

<div class="post-metadata">

**Author:** ![sha1](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@sha1](https://discuss.elastic.co/u/sha1)\
**Post date:** [September 4, 2020, 12:14am UTC](https://discuss.elastic.co/t/cat-indices-response-explanation-for-replica-shards/247447/3 "2020-09-04T00:14:00Z")

</div>

Thanks @stephenb

---

<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:** [October 2, 2020, 12:14am UTC](https://discuss.elastic.co/t/cat-indices-response-explanation-for-replica-shards/247447/4 "2020-10-02T00:14:13Z")

</div>

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