Resolve nested sourced_from fields into update targets on the root indexed type#1247
Merged
myronmarston merged 5 commits intoJun 12, 2026
Merged
Conversation
d4ce494 to
0072a04
Compare
myronmarston
requested changes
Jun 11, 2026
myronmarston
left a comment
Collaborator
There was a problem hiding this comment.
It's awesome to see this coming together!
…ze sourced_from validation
myronmarston
left a comment
Collaborator
There was a problem hiding this comment.
Looking good! Left a couple comments. I also have a claude session going to do a bunch of mutation testing to confirm that the current set of tests will adequately catch regressions. Once that finishes, I'll approve if it doesn't find anything significant. But I wanted to submit the 2 bits of feedback I have so far (particularly the question).
myronmarston
left a comment
Collaborator
There was a problem hiding this comment.
Found one coverage gap. Once that's applied this is good to merge.
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.
What
ElasticGraph's
sourced_fromfeature lets a field on one type be populated from another type's events. Until now that only worked for fields on a top-level indexed type. This PR is a step towards extending it to nested fields — fields on a type that is embedded inside an indexed type.Concretely: when a source event arrives, ElasticGraph can now determine how to update the specific nested element it belongs to, rather than only a top-level document. This is what makes
sourced_fromusable for the nested data models that motivated the feature.This builds only the update-target metadata — the instructions describing which document to update, which embedded element to match, and which fields to write. Two pieces of the nested
sourced_fromfeature are still outstanding and will land in follow-up PRs:So nested
sourced_fromis not yet functional after this PR; it's the schema/metadata layer that the remaining PRs build on (This PR builds on the path registration from the prior PR.)What this PR delivers
sourced_from(clear errors for misconfigured relationships, routing, rollover, and multi-source indexes) now apply to the nested case, with messages that point at the right place to fix.