Skip to content
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

Encapsulate nested identity loading (#65054) #65321

Merged
merged 2 commits into from Nov 20, 2020

Conversation

romseygeek
Copy link
Contributor

When handling nested documents in the Fetch phase, we currently find
a document's nested identity by loading ObjectMappers from a MapperService,
and iterating over their filters. This logic is difficult to follow, end requires
exposing internals of the mappers that we would rather hide away.

This commit refactors all NestedIdentity loading into a single NestedDocuments
object, with per-segment iterators to handle the individual documents. This way
of iterating over documents allows us to share parent filters, meaning that we
can avoid rebuilding the filter for every nested level of every visited document.

When handling nested documents in the Fetch phase, we currently find
a document's nested identity by loading ObjectMappers from a MapperService,
and iterating over their filters. This logic is difficult to follow, end requires
exposing internals of the mappers that we would rather hide away.

This commit refactors all NestedIdentity loading into a single NestedDocuments
object, with per-segment iterators to handle the individual documents. This way
of iterating over documents allows us to share parent filters, meaning that we
can avoid rebuilding the filter for every nested level of every visited document.
@romseygeek romseygeek self-assigned this Nov 20, 2020
@romseygeek romseygeek merged commit 77fe286 into elastic:7.x Nov 20, 2020
@romseygeek romseygeek deleted the fetch/nested-7x branch November 20, 2020 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant