Skip to content

Conversation

@jimczi
Copy link
Contributor

@jimczi jimczi commented Mar 20, 2023

This change adds a new search rest parameter called rest_include_named_queries_score which when set, includes the score of the named queries that matched the document. Note that with this change, the score of named queries is always returned when using the transport client. The rest level has the ability to set the format of the matched_queries section in the response for BWC (as a map with the associated score when the new mode is activated).

Closes #29606

This change adds a new rest parameter called `rest_include_named_queries_score` that when set, includes the score of the named queries that matched the document.
Note that with this change, the score of named queries is always returned when using the transport client. The rest level has the ability to set the format of
the matched_queries section for BWC (kept as is by default).

Closes elastic#65563
@jimczi jimczi added >feature :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.8.0 labels Mar 20, 2023
@jimczi jimczi requested a review from romseygeek March 20, 2023 18:05
@github-actions
Copy link
Contributor

Documentation preview:

@elasticsearchmachine elasticsearchmachine added the external-contributor Pull request authored by a developer outside the Elasticsearch team label Mar 20, 2023
@elasticsearchmachine
Copy link
Collaborator

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

@jimczi jimczi removed the external-contributor Pull request authored by a developer outside the Elasticsearch team label Mar 20, 2023
Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One query about the parameter name, but LGTM otherwise. It's a bit of a shame that this precludes us using Matches to build these for the moment, but that wasn't going to happen any time soon anyway.

@Kimahriman
Copy link

I believe this may have introduced a performance regression in certain edge cases: #120130. Would like some thoughts with people more familiar with these code paths.

jimczi added a commit to jimczi/elasticsearch that referenced this pull request Jan 14, 2025
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 added a commit that referenced this pull request Jan 14, 2025
This PR resolves a regression introduced in #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 #120130
jimczi added a commit to jimczi/elasticsearch that referenced this pull request Jan 14, 2025
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 added a commit to jimczi/elasticsearch that referenced this pull request Jan 14, 2025
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 added a commit to jimczi/elasticsearch that referenced this pull request Jan 14, 2025
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
elasticsearchmachine pushed a commit that referenced this pull request Jan 14, 2025
This PR resolves a regression introduced in #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 #120130
elasticsearchmachine pushed a commit that referenced this pull request Jan 14, 2025
This PR resolves a regression introduced in #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 #120130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>feature :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.8.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Score of named queries

4 participants