# I would like to know about the limit on the maximum number of documents per index

**URL:** https://discuss.elastic.co/t/i-would-like-to-know-about-the-limit-on-the-maximum-number-of-documents-per-index/339497
**Category:** Elasticsearch
**Created:** [July 28, 2023, 5:38am UTC](https://discuss.elastic.co/t/i-would-like-to-know-about-the-limit-on-the-maximum-number-of-documents-per-index/339497 "2023-07-28T05:38:18Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![bbasosuho](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bbasosuho/32/123999_2.png) [@bbasosuho](https://discuss.elastic.co/u/bbasosuho)
#### Post date: [July 28, 2023, 5:38am UTC](https://discuss.elastic.co/t/i-would-like-to-know-about-the-limit-on-the-maximum-number-of-documents-per-index/339497/1 "2023-07-28T05:38:18Z")

</div>

Hi  
We are going to use elasticsearch 8.7. I would like to know if there is a limit on the number of documents to be stored in one index.  
Is there a limit on the number of documents per index?  
Or is there a limit on the number of documents per shard?  
I looked for several articles, and I saw that there was a limit of 2 billion per shard, and now I saw that there is no limit. I wonder if there is a limit in version 8.7.  
Link : [Size your shards | Elasticsearch Guide [8.9] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/size-your-shards.html#shard-size-recommendation)  
I wonder if this document means the limit of 2 billion per shard?

Thannks

---

<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: [July 28, 2023, 5:49am UTC](https://discuss.elastic.co/t/i-would-like-to-know-about-the-limit-on-the-maximum-number-of-documents-per-index/339497/2 "2023-07-28T05:49:16Z")

</div>

> [@bbasosuho](#):
>
> I wonder if this document means the limit of 2 billion per shard?

Yes, that is the limit, although it is probably recommended to stay below that for most use cases and avoid very large shards. As an index can have many shards there is no fixed limit per index.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [July 28, 2023, 6:46am UTC](https://discuss.elastic.co/t/i-would-like-to-know-about-the-limit-on-the-maximum-number-of-documents-per-index/339497/3 "2023-07-28T06:46:56Z")

</div>

Agreed. And I'd start with 8.9.0 which comes with many improvements and also look at [data streams](https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html) if possible. It will make your life easier.

---

<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: [July 28, 2023, 6:50am UTC](https://discuss.elastic.co/t/i-would-like-to-know-about-the-limit-on-the-maximum-number-of-documents-per-index/339497/4 "2023-07-28T06:50:17Z")

</div>

> [@dadoonet](#):
>
> Agreed. And I'd start with 8.9.0 which comes with many improvements and also look at [data streams](https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html) if possible. It will make your life easier.

Note that this generally only applies if you are dealing with immutable data.

---

<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: [August 25, 2023, 6:51am UTC](https://discuss.elastic.co/t/i-would-like-to-know-about-the-limit-on-the-maximum-number-of-documents-per-index/339497/5 "2023-08-25T06:51:10Z")

</div>

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