# How can I reindex monthly indexes to weekly indexes

**URL:** https://discuss.elastic.co/t/how-can-i-reindex-monthly-indexes-to-weekly-indexes/129867
**Category:** Elasticsearch
**Created:** [April 27, 2018, 5:31pm UTC](https://discuss.elastic.co/t/how-can-i-reindex-monthly-indexes-to-weekly-indexes/129867 "2018-04-27T17:31:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kriket](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kriket](https://discuss.elastic.co/u/kriket)
#### Post date: [April 27, 2018, 5:31pm UTC](https://discuss.elastic.co/t/how-can-i-reindex-monthly-indexes-to-weekly-indexes/129867/1 "2018-04-27T17:31:06Z")

</div>

We have currently monthly indexes in the following format  
fabricxxx-access-log-monthly-2018.01  
..  
..  
fabricxxx-access-log-monthly-2018.04

We have decided to move away from monthly indexes to weekly indexes due to data compliance issues.

Can we leverage the "reindex-api" to convert the existing monthly indexes to weekly indexes ?

I have seen/read lot of questions on different forums, but they all discuss about how to convert daily indexes to monthly. My use case is quite the opposite.

---

<div class="post-metadata">

### Author: ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)
#### Post date: [April 30, 2018, 4:59pm UTC](https://discuss.elastic.co/t/how-can-i-reindex-monthly-indexes-to-weekly-indexes/129867/2 "2018-04-30T16:59:40Z")

</div>

Reindex api will work. You'd just include a date range filter in the `source` portion of the request, specifying a single week from the month. Then send it to a dedicated weekly index, and repeat for each week.

---

<div class="post-metadata">

### Author: ![kriket](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kriket](https://discuss.elastic.co/u/kriket)
#### Post date: [May 3, 2018, 4:56am UTC](https://discuss.elastic.co/t/how-can-i-reindex-monthly-indexes-to-weekly-indexes/129867/3 "2018-05-03T04:56:07Z")

</div>

I'll try your suggested solution. Thank you !!

---

<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 31, 2018, 4:56am UTC](https://discuss.elastic.co/t/how-can-i-reindex-monthly-indexes-to-weekly-indexes/129867/4 "2018-05-31T04:56:11Z")

</div>

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