Skip to content

Fix dynamic values and object handling in subobjects: auto #113672

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kkrik-es
Copy link
Contributor

Objects and fields with flattened names may not be detected during document parsing, depending on the use of curly brackets for intermediate objects. In this case, dynamic mappers get created for leaf values that may not match the ones in the mapping, e.g. long vs integer. This gets fixed by checking for existing mappers for a given leaf path on value retrieval.

More so, dynamic (empty) objects may be created to match intermediate objects that would otherwise be flattened. For instance, parsing "foo": { "bar": { "baz": 10 } } may create a dynamic object foo before realizing that there's an existing object foo.bar containing baz. In these cases, the intermediate object should be dropped.

Also, split 20_synthetic_source.yml by moving the copy_to tests in a separate file.

Related to ##108826

@kkrik-es kkrik-es self-assigned this Sep 27, 2024
@kkrik-es kkrik-es marked this pull request as ready for review September 27, 2024 10:15
@kkrik-es kkrik-es requested review from martijnvg and lkts September 27, 2024 10:15
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@kkrik-es
Copy link
Contributor Author

The bwc failure is due to the added test, fails on 8.16 until this get backported..

@mark-vieira mark-vieira added auto-backport Automatically create backport pull requests when merged and removed auto-backport-and-merge labels Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged >non-issue :StorageEngine/Mapping The storage related side of mappings Team:StorageEngine v8.19.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants