# How to split index by the value of field

**URL:** <https://discuss.elastic.co/t/how-to-split-index-by-the-value-of-field/227904>\
**Category:** Elasticsearch\
**Created:** [April 14, 2020, 11:38am UTC](https://discuss.elastic.co/t/how-to-split-index-by-the-value-of-field/227904 "2020-04-14T11:38:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Echo\_yu](https://avatars.discourse-cdn.com/v4/letter/e/e5b9ba/32.png) [@Echo\_yu](https://discuss.elastic.co/u/Echo_yu)\
**Post date:** [April 14, 2020, 11:38am UTC](https://discuss.elastic.co/t/how-to-split-index-by-the-value-of-field/227904/1 "2020-04-14T11:38:30Z")

</div>

Hi，I have an index which contains one of the field named ‘function’， and I want to split the existing index into small indices by the value of the field ‘function’. For example: new index named 'functionA' contains all the details about the functionA. How can I type my code in the dev tool of Kibana? Looking forwarding to your reply.Thanks!

---

<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:** [April 14, 2020, 6:29pm UTC](https://discuss.elastic.co/t/how-to-split-index-by-the-value-of-field/227904/2 "2020-04-14T18:29:07Z")

</div>

How many functions do you have/expect to have? Why are you looking to do this? Be aware that [having large numbers of small indices and shards in Elasticsearch is quite inefficient](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster).

---

<div class="post-metadata">

**Author:** ![Echo\_yu](https://avatars.discourse-cdn.com/v4/letter/e/e5b9ba/32.png) [@Echo\_yu](https://discuss.elastic.co/u/Echo_yu)\
**Post date:** [April 15, 2020, 1:25am UTC](https://discuss.elastic.co/t/how-to-split-index-by-the-value-of-field/227904/3 "2020-04-15T01:25:03Z")

</div>

Hi，I have 5 functions in total,MAYBE functionA, functionB, functionC, functionD, functionE. I am aware about the efficiency problem, and I really want to try. Could you please give me some suggestion on this issue? Looking forward to your reply! THANKS!

---

<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:** [May 13, 2020, 1:25am UTC](https://discuss.elastic.co/t/how-to-split-index-by-the-value-of-field/227904/4 "2020-05-13T01:25:11Z")

</div>

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