-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Removing _doc from data stream effective mappings #134005
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
Conversation
Pinging @elastic/es-data-management (Team:Data Management) |
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.
Pull Request Overview
This PR removes the _doc
field from the top level of data stream effective mappings to align with the API specification. The change ensures that the effective_mapping
field in the get data stream API response no longer contains an unnecessary _doc
wrapper around the actual mapping properties.
Key Changes
- Modified the
getEffectiveMappings
method to detect and unwrap_doc
type placeholders from merged mappings - Updated all test files to expect effective mappings without the
_doc
wrapper - Removed unused
DocumentMapper
import
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
DataStream.java | Implements logic to detect and remove _doc wrapper from effective mappings |
250_data_stream_mappings.yml | Updates YAML REST tests to expect mappings without _doc wrapper |
TransportUpdateDataStreamMappingsActionIT.java | Updates integration tests to use mappings without _doc structure |
DataStreamIT.java | Updates data stream integration tests to remove _doc from mapping definitions and expectations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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 assuming CI is happy
💔 Backport failed
You can use sqren/backport to manually backport by running |
This fixes the
effective_mapping
field of the get data stream API to match what is described in the specification. That is, there is no longer a_doc
field at the top level of the mapping.