-
Notifications
You must be signed in to change notification settings - Fork 25k
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
add Merging mappings subobjects:false check #105099
add Merging mappings subobjects:false check #105099
Conversation
Pinging @elastic/es-search (Team:Search) |
thanks for opening this PR @ghostspiders ! It would be great to have a new test added that reproduces the issue that this change fixed. ObjectMapperMergeTests would be a place to start. Is that something you'd be willing to add? |
@javanna testMergedMappingSubobjectsFalse Function reproduces the issue,My current idea is to modify the doMerge method in the MapperService.java class by removing the assert keyword and enabling the assertSerialization method in the production environment to fix this issue. |
This reverts commit d87549e.
Thanks @ghostspiders I think that you removed the fix. Can you add it back? |
Would you mind signing the CLA if you'd like your change to be merged? Thanks! Perhaps the problem is that you have commits in your PR from two users, and only one of those has signed the CLA. |
#103542 should fix this problem as well. I've included a similar test case as the one in your PR. |
If the subobjects parameter is set to false, Elasticsearch will only validate that objects within the mappings configured during parsing do not contain object mappers, but it does not validate when merging mappings that include subobjects (assertions are used for validation in the test environment, but assertions are disabled in production), which may lead to invalid mappings. Add validation for merging.
#103497