If I ran this command would it also modify the routing value of the document in the source index, or just in the destination index? Thanks.
POST _reindex
{
"source": {
"index": "{old_index_name}",
"size": {batch_size}
},
"dest": {
"index": "{new_index_name}"
},
"script": {
"lang": "painless",
"inline": "ctx._routing=ctx._source.field1"
}
}
Only the destination document will be modified.
The one in the source index will stay untouched.