Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
"copy_to" behaviour in nested fields doesn't match the mapping #6701
I have a nested field, containing some fields with the 'copy_to' attribute. I index a document. Then, I look at the mappings - these show the 'copy_to' field as appearing in the root object, not the nested objects.
(See https://gist.github.com/tstibbs/dc36483f96f8d1471385 for the necessary commands to reproduce.)
However, the fields appear to be copied into the 'copy_to' field in the nested object.
If the 'copied' field is created in the root object, the following query should return my document (but it doesn't):
If the 'copied' field is created in each child, then following query should match (it does):
To me, the current behaviour makes sense - the fields are copied to a field within the item itself. However, I think the issue is that the mapping doesn't match the behaviour, and the documentation doesn't specify which is correct.
So, I can't currently use this feature, because I don't know which issue is the bug!
Actually, your suggestion is more or less the current behaviour (I hadn't thought of specifying the full path). If give the full path (
So actually, I guess the only bug is that it puts the value in the child even when you tell it to put it in the parent.