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

Fix bug where fvh fragments could be loaded from wrong doc #66141

Merged
merged 2 commits into from
Dec 10, 2020

Conversation

jtibshirani
Copy link
Contributor

Backport of #65641.

…5641)

This PR fixes a regression where fvh fragments could be loaded from the wrong
document _source.

Some `FragmentsBuilder` implementations contain a `SourceLookup` to load from
_source. The lookup should be positioned to load from the current hit document.
However, since `FragmentsBuilder` are cached and shared across hits, the lookup
is never updated to load from the new documents. This means we accidentally
load _source from a different document.

The regression was introduced in elastic#60179, which started storing `SourceLookup`
on `FragmentsBuilder`.

Fixes elastic#65533.
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Dec 9, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@jtibshirani jtibshirani merged commit cf3ad0c into elastic:7.x Dec 10, 2020
@jtibshirani jtibshirani deleted the fvh branch December 10, 2020 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport >bug :Search Relevance/Highlighting How a query matched a document Team:Search Meta label for search team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants