# Why does this reindex API fail (Reindex multiple indexes at once)

**URL:** <https://discuss.elastic.co/t/why-does-this-reindex-api-fail-reindex-multiple-indexes-at-once/237104>\
**Category:** Elasticsearch\
**Created:** [June 15, 2020, 9:41am UTC](https://discuss.elastic.co/t/why-does-this-reindex-api-fail-reindex-multiple-indexes-at-once/237104 "2020-06-15T09:41:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![defalt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/defalt/32/71379_2.png) [@defalt](https://discuss.elastic.co/u/defalt)\
**Post date:** [June 15, 2020, 9:41am UTC](https://discuss.elastic.co/t/why-does-this-reindex-api-fail-reindex-multiple-indexes-at-once/237104/1 "2020-06-15T09:41:31Z")

</div>

Hi,  
I have 5 Indices on my Elasticsearch and want to reindex all of them. Is there an API which can do this? I tried it with this approach:

```
{
  "conflicts": "proceed",
  "source": {
    "index": ["index1", "index2","index3","index4","index5"]
  },
  "dest": {
    "index": ["index1_new", "index2_new","index3_new","index4_new","index5_new"],
    "op_type": "create"
  }
}
```

---

<div class="post-metadata">

**Author:** ![gab.bernasconi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gab.bernasconi/32/57955_2.png) [@gab.bernasconi](https://discuss.elastic.co/u/gab.bernasconi)\
**Post date:** [June 15, 2020, 9:57am UTC](https://discuss.elastic.co/t/why-does-this-reindex-api-fail-reindex-multiple-indexes-at-once/237104/2 "2020-06-15T09:57:06Z")

</div>

Hi,

I don't think the reindex API supports a LIST of indices: I think it only supports GLOBs to define the source index (e.g. `"source": {"index": "index*"}`)

Please see [this](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#docs-reindex-many-indices) link about how to handle many indices at a time (actually, the advice is to reindex them one at a time).

---

<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 13, 2020, 10:11am UTC](https://discuss.elastic.co/t/why-does-this-reindex-api-fail-reindex-multiple-indexes-at-once/237104/3 "2020-07-13T10:11:55Z")

</div>

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