# Max size of shard and index

**URL:** <https://discuss.elastic.co/t/max-size-of-shard-and-index/92610>\
**Category:** Elasticsearch\
**Created:** [July 11, 2017, 9:18am UTC](https://discuss.elastic.co/t/max-size-of-shard-and-index/92610 "2017-07-11T09:18:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashwin\_Kumar\_Thunga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashwin_kumar_thunga/32/19946_2.png) [@Ashwin\_Kumar\_Thunga](https://discuss.elastic.co/u/Ashwin_Kumar_Thunga)\
**Post date:** [July 11, 2017, 9:18am UTC](https://discuss.elastic.co/t/max-size-of-shard-and-index/92610/1 "2017-07-11T09:18:09Z")

</div>

Hello,  
I am new to Elastic search and started using elastic cloud services. I have the following questions, appreciate if some one can answer

1. What is the max size of the shard? I have read in some place that its recommended to have this to 50GB. So, if I create an index which has default no of shards as 5, then max index size is 250GB. So, which means, if index size is approaching 250GB, should i create one more index?

2. If I create multiple indexes, then can I query be fired on multiple indexes?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 11, 2017, 9:21am UTC](https://discuss.elastic.co/t/max-size-of-shard-and-index/92610/2 "2017-07-11T09:21:22Z")

</div>

There is no theoretical limit to the GB size of a shard, you cannot go over 2 billion docs though.  
But as you point out we do suggest keeping it under 50GB.

[https://www.elastic.co/guide/en/elasticsearch/reference/5.5/search-search.html#search-multi-index-type](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/search-search.html#search-multi-index-type) should cover the second question 🙂

---

<div class="post-metadata">

**Author:** ![Ashwin\_Kumar\_Thunga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashwin_kumar_thunga/32/19946_2.png) [@Ashwin\_Kumar\_Thunga](https://discuss.elastic.co/u/Ashwin_Kumar_Thunga)\
**Post date:** [July 11, 2017, 9:25am UTC](https://discuss.elastic.co/t/max-size-of-shard-and-index/92610/3 "2017-07-11T09:25:08Z")

</div>

Thanks a lot Mark Walkom.  
If I design my solution like, would it be fine?

1. Create a index with name "OurCompany-0-" with 5 shards. I watch its size over a period of time. If it crosses 250GB, then I can create one more index OurCompany-1-.

2. Then I will issue the search on OurCompany-\*

Is this is a recommended way of going about creating indexes.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 11, 2017, 9:38am UTC](https://discuss.elastic.co/t/max-size-of-shard-and-index/92610/4 "2017-07-11T09:38:58Z")

</div>

What sort of data is it?

---

<div class="post-metadata">

**Author:** ![Ashwin\_Kumar\_Thunga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashwin_kumar_thunga/32/19946_2.png) [@Ashwin\_Kumar\_Thunga](https://discuss.elastic.co/u/Ashwin_Kumar_Thunga)\
**Post date:** [July 11, 2017, 9:43am UTC](https://discuss.elastic.co/t/max-size-of-shard-and-index/92610/5 "2017-07-11T09:43:49Z")

</div>

Data would be mostly pdf document content. We would convert pdf to text and the text is the one we would add to the index.

A use case would be,  
Search all the documents or records where the key word 'xyz' is there?  
PDF file size can be around 50 MB on a average. If we convert all the PDF to text, associate it to a text field and store it.

Also, please guide me if I need to take any precautions where one field of the record would contain the text of the whole pdf (of say 50MB) ?

---

<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 8, 2017, 9:44am UTC](https://discuss.elastic.co/t/max-size-of-shard-and-index/92610/6 "2017-08-08T09:44:18Z")

</div>

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