Don't use _type field for nested paths#50312
Closed
romseygeek wants to merge 7 commits intoelastic:masterfrom
Closed
Don't use _type field for nested paths#50312romseygeek wants to merge 7 commits intoelastic:masterfrom
_type field for nested paths#50312romseygeek wants to merge 7 commits intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-search (:Search/Mapping) |
Contributor
Author
|
@elasticmachine update branch |
jtibshirani
reviewed
Jan 6, 2020
Contributor
There was a problem hiding this comment.
@romseygeek I think it would be helpful to separate this PR into two:
- Switch to
_nested_pathinstead of_typeto store nested paths. - Then follow-up with a change to remove
TypeFieldMapper.
This helps in isolating these two big changes, which are related but still distinct. It's also not clear to me whether we can just remove TypeFieldMapper in 8.0 -- some of the conversations we've had around API versioning seem to suggest that we need logic to accept (but ignore) references to _type in the search request. Separating the PR into two would let us make progress on reviewing the _nested_path change while we get clarity on the API versioning questions.
Contributor
Author
|
I've opened #51100 to deal with just adding the nested field mapper. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
_typefield is not only used to store types (obsolete in 8.0) but alsothe nested paths of child documents. This overload prevents us from removing
the
_typefield andTypeFieldType.This commit changes nested field mappers to use a
_nested_pathfield instead,with some backwards-compatibility shims to ensure that pre-8.0 indexes still use
_type.Closes #24362