Skip to content

Conversation

@jimczi
Copy link
Contributor

@jimczi jimczi commented Jan 14, 2025

Backports the following commits to 8.17:

This PR resolves a regression introduced in elastic#94564 by ensuring that the approximation is used when advancing matched query clauses.
Utilizing the two-phase iterator to validate matches guarantees that we do not attempt to find the next document fulfilling the two-phase criteria beyond the current document.
This fix prevents scenarios where matching a document in the second phase significantly increases query complexity, especially in cases involving restrictive second-pass filters.

Closes elastic#120130
@jimczi jimczi added :Search Relevance/Search Catch all for Search Relevance >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch labels Jan 14, 2025
@elasticsearchmachine elasticsearchmachine merged commit 85f8a64 into elastic:8.17 Jan 14, 2025
15 checks passed
@jimczi jimczi deleted the backport/8.17/pr-120133 branch January 14, 2025 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :Search Relevance/Search Catch all for Search Relevance Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v8.17.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants