Illegal combination of [copy_to] and [nested] mappings: [copy_to]

I am facing an error for following mapping and my version is current 6.3

{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Illegal combination of [copy_to] and [nested] mappings: [copy_to] may only copy data to the current nested document or any of its parents, however one [copy_to] directive is trying to copy data from nested object [null] to [teams]"
}
],
"type": "illegal_argument_exception",
"reason": "Illegal combination of [copy_to] and [nested] mappings: [copy_to] may only copy data to the current nested document or any of its parents, however one [copy_to] directive is trying to copy data from nested object [null] to [teams]"
},
"status": 400
}

``PUT twitter/_mapping/doc/
{
"properties": {
"priority": {
"type": "integer",
"copy_to": "teams.priority"
},
"teams": {
"type": "nested",
"properties":{
"id": {
"type": "integer",
"index": true
},
"priority": {
"type": "integer",
"index": true
}
}
}
}
}

``

1 Like

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