# In elasticsearch 5.4.2 can merge indexs?

**URL:** https://discuss.elastic.co/t/in-elasticsearch-5-4-2-can-merge-indexs/98920
**Category:** Elasticsearch
**Created:** [August 31, 2017, 1:28am UTC](https://discuss.elastic.co/t/in-elasticsearch-5-4-2-can-merge-indexs/98920 "2017-08-31T01:28:24Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)
#### Post date: [August 31, 2017, 1:28am UTC](https://discuss.elastic.co/t/in-elasticsearch-5-4-2-can-merge-indexs/98920/1 "2017-08-31T01:28:24Z")

</div>

in elasticsearch 5.4.2 can merge indexs?  
in my env , have so match shards, can merge indexs to only,  
the shards can't have so match data.

---

<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 31, 2017, 2:03am UTC](https://discuss.elastic.co/t/in-elasticsearch-5-4-2-can-merge-indexs/98920/2 "2017-08-31T02:03:09Z")

</div>

You can `_shrink` indices to have less shards, but you cannot merge/shrink separate indices into one with the same API.

You could reindex (eg) daily into weekly/monthly though.

---

<div class="post-metadata">

### Author: ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)
#### Post date: [August 31, 2017, 2:23am UTC](https://discuss.elastic.co/t/in-elasticsearch-5-4-2-can-merge-indexs/98920/3 "2017-08-31T02:23:26Z")

</div>

shrink can ones do many indexs?  
link:

- curl -XPOST 'xxx.xx.xx.xx:9200/system-log-61-2017.08\*/\_shrink/system-log-61-2017.08?pretty'

can give me a example about reindex daily into weekly/monthly about the exist indexs?

---

<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 31, 2017, 3:54am UTC](https://discuss.elastic.co/t/in-elasticsearch-5-4-2-can-merge-indexs/98920/4 "2017-08-31T03:54:31Z")

</div>

Shrink is here - [https://www.elastic.co/guide/en/elasticsearch/reference/5.5/indices-shrink-index.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/indices-shrink-index.html)

Reindex is here - [https://www.elastic.co/guide/en/elasticsearch/reference/5.5/docs-reindex.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/docs-reindex.html). There a chapter on reindexing daily indices as well 🙂

---

<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 28, 2017, 4:26am UTC](https://discuss.elastic.co/t/in-elasticsearch-5-4-2-can-merge-indexs/98920/6 "2017-09-28T04:26:11Z")

</div>

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