New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nest pass-through objects within objects #105062
Conversation
Hi @kkrik-es, I've created a changelog YAML for you. |
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one idea for an additional case to test. Otherwise LGTM!
@@ -360,50 +360,150 @@ public void testPassThroughObjectWithAliases() throws IOException { | |||
assertThat(mapperService.mappingLookup().getMapper("labels.dim"), instanceOf(KeywordFieldMapper.class)); | |||
} | |||
|
|||
public void testPassThroughObjectNested() throws IOException { | |||
MapperService mapperService = createMapperService(mapping(b -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the same test case, could you also add a top level attributes passthrough field? Just to check that this doesn’t cause a naming conflict because there’s also an attributes field in the resource object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, had a test for that in yaml too.
This is a follow-up on #103648, lifting the limitation that pass-through objects need to be defined at the root level.
Pass-through objects still need to be "leaf" fields, they can't have child objects.
Related to #103567