# Specify index shard size when creating index?

**URL:** https://discuss.elastic.co/t/specify-index-shard-size-when-creating-index/80315
**Category:** Elasticsearch
**Created:** [March 28, 2017, 3:10pm UTC](https://discuss.elastic.co/t/specify-index-shard-size-when-creating-index/80315 "2017-03-28T15:10:55Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ESCoder](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@ESCoder](https://discuss.elastic.co/u/ESCoder)
#### Post date: [March 28, 2017, 3:10pm UTC](https://discuss.elastic.co/t/specify-index-shard-size-when-creating-index/80315/1 "2017-03-28T15:10:55Z")

</div>

hi,  
how do i specify the size of a shard? I want the maximum size of my shard to be 50GB.  
When creating index, i see number of shards, and numvber of replicas settings but not anything related to shard size?

---

<div class="post-metadata">

### Author: ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)
#### Post date: [March 28, 2017, 3:14pm UTC](https://discuss.elastic.co/t/specify-index-shard-size-when-creating-index/80315/2 "2017-03-28T15:14:12Z")

</div>

See [https://www.elastic.co/blog/managing-time-based-indices-efficiently](https://www.elastic.co/blog/managing-time-based-indices-efficiently)

---

<div class="post-metadata">

### Author: ![ESCoder](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@ESCoder](https://discuss.elastic.co/u/ESCoder)
#### Post date: [March 28, 2017, 8:01pm UTC](https://discuss.elastic.co/t/specify-index-shard-size-when-creating-index/80315/3 "2017-03-28T20:01:35Z")

</div>

sorry I'm still a newbie...I've read the article, it looks like we cannot specify a hard limit on the shard size when creating an index...is this true?

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [March 28, 2017, 8:18pm UTC](https://discuss.elastic.co/t/specify-index-shard-size-when-creating-index/80315/4 "2017-03-28T20:18:39Z")

</div>

> [@ESCoder](#):
>
> we cannot specify a hard limit on the shard size when creating an index...is this true?

Yes. The next best thing you can do, however, is to use the rollover API to specify a number of documents per index, and rollover to new indices at that number. It should allow you to approximate the same effect, so long as your document sizes are relatively similar.

---

<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: [April 25, 2017, 8:18pm UTC](https://discuss.elastic.co/t/specify-index-shard-size-when-creating-index/80315/5 "2017-04-25T20:18:49Z")

</div>

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