# What is the difference on \_cat/indices and /\_stats on index storage

**URL:** <https://discuss.elastic.co/t/what-is-the-difference-on-cat-indices-and-stats-on-index-storage/109636>\
**Category:** Elasticsearch\
**Created:** [November 29, 2017, 7:55pm UTC](https://discuss.elastic.co/t/what-is-the-difference-on-cat-indices-and-stats-on-index-storage/109636 "2017-11-29T19:55:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![senmansei](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@senmansei](https://discuss.elastic.co/u/senmansei)\
**Post date:** [November 29, 2017, 7:55pm UTC](https://discuss.elastic.co/t/what-is-the-difference-on-cat-indices-and-stats-on-index-storage/109636/1 "2017-11-29T19:55:35Z")

</div>

I was using these two different get calls to collect the index usage information:

1. My rest call on \_stats: GET /index1/\_stats, and

2. My rest call on \_cat: GET /\_cat/indices/index1?v and

Are these two values supposed to be the same? If not(at least that is the case on my end and they differs a lot), what is the difference between the logical meanings on these two calls?

---

<div class="post-metadata">

**Author:** ![Fram\_Souza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fram_souza/32/24833_2.png) [@Fram\_Souza](https://discuss.elastic.co/u/Fram_Souza)\
**Post date:** [November 29, 2017, 11:42pm UTC](https://discuss.elastic.co/t/what-is-the-difference-on-cat-indices-and-stats-on-index-storage/109636/2 "2017-11-29T23:42:05Z")

</div>

Hi senmansei, 😉

In call GET /my\_index/\_stats you get more detail of what is going on inside your index, such as: Indexing time, cached query, segments, merge. This type of information we do not have with the call GET \_cat/indices/my\_index.

Both have the same information, but one is much more detailed than the other. Use the \_cat / indices / my\_index GET when you want quick information about the status of your index, use the \_my\_index / stats GET when you need more specific index information such as: the total merge in bytes.

Another note is that the "pri.store.size" (GET \_cat/indice/my\_index) column represents only the used space of the primary shards. The "store.size" column represents the size of the primary shards + replicas.

Ah! In the GET my\_index / stats call you see the output only in bytes.  
did you get it ?

---

<div class="post-metadata">

**Author:** ![senmansei](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@senmansei](https://discuss.elastic.co/u/senmansei)\
**Post date:** [November 30, 2017, 1:18am UTC](https://discuss.elastic.co/t/what-is-the-difference-on-cat-indices-and-stats-on-index-storage/109636/3 "2017-11-30T01:18:57Z")

</div>

Thank you Fram for your time and reply. Your answer did help a lot.

However, it still doesn't resolve my confusion that the value of "pri.store.size" (GET \_cat/indice/my\_index) is not equal to the value of "indices.index1.primaries.merges.total\_size\_in\_bytes" (GET /index1/\_stats) on my side. I guess according to your answer, these two values should still be the same as they mesures store size both on primary shards.

FYI, I've done bytes to mb conversion before the value comparison.

---

<div class="post-metadata">

**Author:** ![Fram\_Souza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fram_souza/32/24833_2.png) [@Fram\_Souza](https://discuss.elastic.co/u/Fram_Souza)\
**Post date:** [November 30, 2017, 11:34am UTC](https://discuss.elastic.co/t/what-is-the-difference-on-cat-indices-and-stats-on-index-storage/109636/4 "2017-11-30T11:34:12Z")

</div>

@senmansei ;D

Do you merge indices? In this metric "indices.index1.primaries.merges.total\_size\_in\_bytes" we will have the total bytes that were "mergeados". If you want to find the same value that is obtained in the GET \_cat / index / my\_index call you should parse the flag "indeices.index1.store.size\_in\_bytes". Data merge is performed to save disk space, ie if you have multiple small segments of a Lucene index, the merge will join together all those segments of a larger segment, which helps us a lot in search performance .

---

<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, 2017, 11:34am UTC](https://discuss.elastic.co/t/what-is-the-difference-on-cat-indices-and-stats-on-index-storage/109636/5 "2017-12-28T11:34:35Z")

</div>

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