Skip to content

Check prefixes when constructing synthetic source for flattened fields - #129580

Merged
kkrik-es merged 2 commits into
elastic:mainfrom
kkrik-es:fix/129508
Jun 18, 2025
Merged

kkrik-es merged 2 commits into
elastic:mainfrom
kkrik-es:fix/129508

Conversation

@kkrik-es

Copy link
Copy Markdown
Member

Synthetic source for flattened fields has object grouping logic that currently checks subfields based on their suffix (leaf name). It should also be taking into account the prefix, to avoid grouping together objects with the same leaf name but different path.

Fixes #129508

@kkrik-es kkrik-es self-assigned this Jun 17, 2025
@kkrik-es kkrik-es added >bug auto-backport Automatically create backport pull requests when merged Team:StorageEngine :StorageEngine/Mapping The storage related side of mappings v8.19.0 v9.1.0 v9.0.3 labels Jun 17, 2025
@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

Hi @kkrik-es, I've created a changelog YAML for you.

@kkrik-es
kkrik-es marked this pull request as ready for review June 17, 2025 19:13
@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

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

@parkertimmins parkertimmins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this looks correct to me

@martijnvg martijnvg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

💚 Backport successful

Status Branch Result
✅ 8.19
✅ 9.0

kkrik-es added a commit to kkrik-es/elasticsearch that referenced this pull request Jun 18, 2025
elastic#129580)

* Check prefixes when constructing synthetic source for flattened fields

* Update docs/changelog/129580.yaml
elasticsearchmachine pushed a commit that referenced this pull request Jun 18, 2025
#129580) (#129609)

* Check prefixes when constructing synthetic source for flattened fields

* Update docs/changelog/129580.yaml
elasticsearchmachine pushed a commit that referenced this pull request Jun 18, 2025
#129580) (#129610)

* Check prefixes when constructing synthetic source for flattened fields

* Update docs/changelog/129580.yaml
@kkrik-es
kkrik-es deleted the fix/129508 branch June 19, 2025 11:26
kderusso pushed a commit to kderusso/elasticsearch that referenced this pull request Jun 23, 2025
elastic#129580)

* Check prefixes when constructing synthetic source for flattened fields

* Update docs/changelog/129580.yaml
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 >bug :StorageEngine/Mapping The storage related side of mappings Team:StorageEngine v8.19.0 v9.0.3 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flattened field with synthetic _source produces incorrect _source if different object paths share same leaf name

4 participants