I'm using alias per user. For each alias I'm linking a routing
and a filter
:
PUT _/<index>/_alias/u1@u1.com'
{
"routing": "u1@u1.com",
"filter": {
"term": {
"user": "u1@u1.com"
}
}
}
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
?
Example:
POST _/_reindex
{
"source": {
"index": "old"
},
"dest": {
"index": "new"
}
}
'
Any ideas?