# Best practices for indexing documents

**URL:** <https://discuss.elastic.co/t/best-practices-for-indexing-documents/282347>\
**Category:** Elasticsearch\
**Created:** [August 24, 2021, 12:30pm UTC](https://discuss.elastic.co/t/best-practices-for-indexing-documents/282347 "2021-08-24T12:30:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheHunter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thehunter/32/93635_2.png) [@TheHunter](https://discuss.elastic.co/u/TheHunter)\
**Post date:** [August 24, 2021, 12:30pm UTC](https://discuss.elastic.co/t/best-practices-for-indexing-documents/282347/1 "2021-08-24T12:30:48Z")

</div>

Hi all,  
I’m trying to get info about best practices to define indices, mainly in microservices environment.  
The question is, inside each our microservices we have many “schemas”, so in order to use in a right way sharding, we define indices using a strategy.. but the right question is.. Can I define unlimited indices inside a cluster as I want ? Or maybe is it convenient to use less indices as possible ?  
Considering that in the most of cases, these documents to persist will be always more a more.. now I’ve estimated almost one tera of documents (in a single indice)..  
Is it convenient to have enormous indices or split into small ones ?

Thanks in advance

---

<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:** [August 25, 2021, 1:09am UTC](https://discuss.elastic.co/t/best-practices-for-indexing-documents/282347/2 "2021-08-25T01:09:46Z")

</div>

Welcome to our community! 😃

> [@TheHunter](#):
>
> Can I define unlimited indices inside a cluster as I want ? Or maybe is it convenient to use less indices as possible ?

Shards use resources, having unlimited resources means unlimited shards, which is far from efficient.

> [@TheHunter](#):
>
> Is it convenient to have enormous indices or split into small ones ?

Split them. What sort of data is this?

---

<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:** [August 25, 2021, 4:43am UTC](https://discuss.elastic.co/t/best-practices-for-indexing-documents/282347/3 "2021-08-25T04:43:46Z")

</div>

Have a look at [this section of the docs](https://www.elastic.co/guide/en/elasticsearch/reference/7.14/size-your-shards.html) and [this blog post](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster) for guidance.

---

<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:** [September 22, 2021, 4:44am UTC](https://discuss.elastic.co/t/best-practices-for-indexing-documents/282347/4 "2021-09-22T04:44:01Z")

</div>

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