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

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:

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

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