# Reducing the number of shards on an index without the source

**URL:** <https://discuss.elastic.co/t/reducing-the-number-of-shards-on-an-index-without-the-source/14155>\
**Category:** Elasticsearch\
**Created:** [October 29, 2013, 1:15pm UTC](https://discuss.elastic.co/t/reducing-the-number-of-shards-on-an-index-without-the-source/14155 "2013-10-29T13:15:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emilie\_Lavigne](https://avatars.discourse-cdn.com/v4/letter/e/91b2a8/32.png) [@Emilie\_Lavigne](https://discuss.elastic.co/u/Emilie_Lavigne)\
**Post date:** [October 29, 2013, 1:15pm UTC](https://discuss.elastic.co/t/reducing-the-number-of-shards-on-an-index-without-the-source/14155/1 "2013-10-29T13:15:45Z")

</div>

Is there a way to merge the shards of a an index without the source (aka  
without reindexing)? More specifically, we would like to turn an index of  
5 shards into an index of a single shard once writing is no longer  
happening on that index.

What our environment looks like:

- Our ElasticSearch cluster is used as a search layer atop a Hadoop  
database. The source is therefore not stored in ElasticSearch
- Our ElasticSearch cluster consists of 4 nodes, each with 32 cores, for  
a total of 128 cores.
- We are currently indexing roughly 6gb of data (18gb with replicas)  
every day.
- We create an index per day, each with 5 shards
- Many of our searches are being run against all indices.

We figure that multiple shards per index make writing more efficient.  
However, we are always only writing to the most recent day. After that,  
having multiple shards per index actually makes our cluster more fragile  
since each search is firing off too many threads in order to search all our  
data (currently, we have 100 days of data - aka 500 shards). It only takes  
roughly 10 parallel searches to get a ThreadPoolExecutor exception.

If we can't merge the shards without the source, do you have any other  
suggestions?

Thank you,

Emilie

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [July 6, 2017, 2:10am UTC](https://discuss.elastic.co/t/reducing-the-number-of-shards-on-an-index-without-the-source/14155/2 "2017-07-06T02:10:01Z")

</div>

Closed on July 6, 2017, 2:10am UTC


