# How can I check how many shards I have for an index?

**URL:** <https://discuss.elastic.co/t/how-can-i-check-how-many-shards-i-have-for-an-index/256510>\
**Category:** Elasticsearch\
**Created:** [November 24, 2020, 12:51pm UTC](https://discuss.elastic.co/t/how-can-i-check-how-many-shards-i-have-for-an-index/256510 "2020-11-24T12:51:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahalabobis](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@mahalabobis](https://discuss.elastic.co/u/mahalabobis)\
**Post date:** [November 24, 2020, 12:51pm UTC](https://discuss.elastic.co/t/how-can-i-check-how-many-shards-i-have-for-an-index/256510/1 "2020-11-24T12:51:06Z")

</div>

I'm using this command

` curl -X GET http://elasticsearch:9200/my-index-*/_settings?pretty`

and I'm getting` "number_of_shards": "1"`.

Which doesn't make much sense, because when the index is created on runtime, no settings related to shards are defined. And as far as I know the default number of shards is 5(correct if I'm wrong).

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 24, 2020, 1:08pm UTC](https://discuss.elastic.co/t/how-can-i-check-how-many-shards-i-have-for-an-index/256510/2 "2020-11-24T13:08:58Z")

</div>

In recent versions the default number of primary shards is 1.

---

<div class="post-metadata">

**Author:** ![mahalabobis](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@mahalabobis](https://discuss.elastic.co/u/mahalabobis)\
**Post date:** [November 24, 2020, 1:28pm UTC](https://discuss.elastic.co/t/how-can-i-check-how-many-shards-i-have-for-an-index/256510/3 "2020-11-24T13:28:58Z")

</div>

Could you please clarify in which version this changed(or provide me a link)?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 24, 2020, 1:50pm UTC](https://discuss.elastic.co/t/how-can-i-check-how-many-shards-i-have-for-an-index/256510/4 "2020-11-24T13:50:17Z")

</div>

Have a look at this:

> **[Breaking changes in 7.0 | Elasticsearch Reference \[7.10\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-7.0.html#_index_creation_no_longer_defaults_to_five_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:** [December 22, 2020, 1:50pm UTC](https://discuss.elastic.co/t/how-can-i-check-how-many-shards-i-have-for-an-index/256510/5 "2020-12-22T13:50:26Z")

</div>

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