POST _reindex
{
"source": {
"index": "twitter"
},
"dest": {
"index": "new_twitter"
},
"script": {
"source": """
ctx._source.type = ctx._type;
ctx._id = ctx._type + '-' + ctx._id;
ctx._type = '_doc';
"""
}
}
I want to understand what this "ctx" refers to. There is left hand ctx and there is right hand ctx. I am confused on what's actually going on in the "source" field. Can somebody help me understand the script?