Reindex and aliases (keep routing policy)


I'm using alias per user. For each alias I'm linking a routing and a filter:

PUT _/<index>/_alias/'
  "routing": "",
  "filter": {
    "term": {
      "user": ""

So, I'm setting that indexation and searching is using routing information.

I want to reindex all documents on another index using _reindex api. After having created the new index, I've created all aliases. So, I figure out that documents have to be reindexed using aliases in order to keep routing policy.

Is there any way to set it up on _reindex?


POST _/_reindex
  "source": {
    "index": "old"
  "dest": {
    "index": "new"

Any ideas?

(Luca Wintergerst) #2

_reindex will preserve your routing values.
If you would like to change them you can either use what _reindex provides (take a look here or you can use the _ingest functionality (

(system) #3

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