Removal of mapping types | Elasticsearch Guide [7.17] | Elastic

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?

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