[SOLVED] Reindex with index pattern

Hi all,

I want to test the reindex API follow the documentation.

Did anybody try to reindex based on pattern index, like:

POST /_reindex
{
  "source": {
    "index": "test*"
  },
  "dest": {
    "index": "new_test*"
  }
}

I want to match all index that contain "test" in their name.

It is working like that ? Can I reindex several indices to seceral new indices ?

Thanks in advance,
Alex

Reindex doesn't have any support for reversing a pattern into the destination index name. You can do with with a script. This PR:

Has documentation for how to do it in 5.0.0 with the painless sandboxed dynamic scripting language. You'd have to do it with groovy in 2.3 or 2.4.

The trouble with doing several indexes at once is that the process isn't incremental. They all finish at the same time.

Thanks for your quick reply !

I will do in Python.

Best regards,
Alex