-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Don't use _type
field for nested paths
#50312
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
Don't use _type
field for nested paths
#50312
Conversation
Pinging @elastic/es-search (:Search/Mapping) |
@elasticmachine update branch |
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.
@romseygeek I think it would be helpful to separate this PR into two:
- Switch to
_nested_path
instead of_type
to 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.
I've opened #51100 to deal with just adding the nested field mapper. |
The
_type
field 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
_type
field andTypeFieldType
.This commit changes nested field mappers to use a
_nested_path
field instead,with some backwards-compatibility shims to ensure that pre-8.0 indexes still use
_type
.Closes #24362