-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Fix updating include_in_parent/include_in_root of nested field. #54386
Conversation
Pinging @elastic/es-core-features (:Core/Features/Indices APIs) |
Pinging @elastic/es-search (:Search/Mapping) |
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.
Thanks @gaobinlong for the contribution! I left a couple comments.
server/src/main/java/org/elasticsearch/index/mapper/ObjectMapper.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/mapper/ObjectMapper.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/index/mapper/NestedObjectMapperTests.java
Outdated
Show resolved
Hide resolved
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.
The new structure looks good, I have one last comment about the test. I'll kick off CI to check that all tests pass.
server/src/test/java/org/elasticsearch/index/mapper/NestedObjectMapperTests.java
Show resolved
Hide resolved
@elasticmachine test this please |
@jtibshirani, I have pushed a new commit, can you take a look at the change? |
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.
One last comment, thanks for your patience on this review.
server/src/test/java/org/elasticsearch/index/mapper/NestedObjectMapperTests.java
Outdated
Show resolved
Hide resolved
@elasticmachine test this please |
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.
Looks good to me! I will merge and backport to 7.x, along with a note in the migration docs.
elastic#54386) The main changes are: 1. Throw an error when updating `include_in_parent` or `include_in_root` attribute of nested field dynamically by the PUT mapping API. 2. Add a test for the change. Closes elastic#53792
Closes #53792
The main changes are:
include_in_parent
orinclude_in_root
attribute of nested field dynamically by the PUT mapping API.