Copy_to parameter clarification?

Hi,

When i went through the copy_to parameter documentation in elastic.co. It says
"The original _source field will not be modified to show the copied values"

PUT /my_index
{
  "mappings": {
    "my_type": {
      "properties": {
        "first_name": {
          "type": "string",
          "copy_to": "full_name" 
        },
        "last_name": {
          "type": "string",
          "copy_to": "full_name" 
        },
        "full_name": {
          "type": "string"
        }
      }
    }
  }
}

It means for the above code _source won't have copied values (i.e."first_name","last_name") for the full_name.
Will be a problem when i am doing reindexing ?

Thanks

Yes. When reindexing if you don't have a similar mapping (copy_to), then full_name won't be generated. Unless you reindex through an ingest pipeline which creates this new field as a concatenation on the 2 other fields.

Thanks David

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