-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure shared source always represents the top-level root document. (
#66725) We started passing down the root document's _source when processing nested hits, to avoid reloading and reparsing the root source for each hit. Unfortunately the approach did not work when there are multiple layers of `inner_hits`. In this case, the second-layer inner hit received its immediate parent's source instead of the root source. This parent source is filtered to just contain the parts corresponding to the nested document, but the source parsing logic is designed to always operate on the top-level root source. This caused failures when loading the second-layer inner hits. This PR makes sure to always pass the root document's _source when processing inner hits, even if there are multiple layers.
- Loading branch information
1 parent
0fad7f6
commit ff67baa
Showing
4 changed files
with
158 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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