# Is it possible to reindex using a source index including a wildcard?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-reindex-using-a-source-index-including-a-wildcard/277059>\
**Category:** Elasticsearch\
**Created:** [June 25, 2021, 12:47pm UTC](https://discuss.elastic.co/t/is-it-possible-to-reindex-using-a-source-index-including-a-wildcard/277059 "2021-06-25T12:47:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amphagory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amphagory/32/46127_2.png) [@Amphagory](https://discuss.elastic.co/u/Amphagory)\
**Post date:** [June 25, 2021, 12:47pm UTC](https://discuss.elastic.co/t/is-it-possible-to-reindex-using-a-source-index-including-a-wildcard/277059/1 "2021-06-25T12:47:02Z")

</div>

Hello,

I'm trying to perform a reindex where the source index is split up into a number of indices all starting with `my_index`. Also, I'm limiting the data I want between a certain range.  
The syntax I have is as follows:

```auto
POST _reindex
{
  "source": {
    "remote": {
      "host": "https://ELASTICSEARCH_URL:9200",
      "username": "username",
      "password": "password"
    },
    "index": "my_index*",
    "query": {
      "range": {
        "@timestamp": {
          "gte": "2020-05-01T00:00:00",
          "lte": "2021-06-01T00:00:00"
        }
      }
    }
  },
  "dest": {
    "index": "new_index_may2020_may2021"
  }
}

```

This query does not create a destination index `new_index_may2020_may2021`. I was wondering if anyone had success in completing the same task as I have trying to perform?

Mike

---

<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 23, 2021, 12:47pm UTC](https://discuss.elastic.co/t/is-it-possible-to-reindex-using-a-source-index-including-a-wildcard/277059/2 "2021-07-23T12:47:18Z")

</div>

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