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

[8.13] Fix performance bug in SourceConfirmedTextQuery#matches #105983

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Mar 5, 2024

Manual backport of #105930

…5930)

This change ensures that the matches implementation of the `SourceConfirmedTextQuery` only checks the current document instead of calling advance on the two phase iterator. The latter tries to find the first doc that matches the query instead of restricting the search to the current doc. This can lead to abnormally slow highlighting if the query is very restrictive and the highlight is done on a non-matching document.

Closes elastic#103298
@jimczi jimczi merged commit 34fe40b into elastic:8.13 Mar 6, 2024
14 checks passed
@jimczi jimczi deleted the backport_105930 branch March 6, 2024 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant