-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Scroll API fails to apply Rescore query #31775
Comments
Pinging @elastic/es-search-aggs |
@bwsawyer I marked this issue as a bug because it works on 5.x but I wonder why you'd use a rescorer in a scroll context ? Is there something you cannot achieve with the main query ? A scroll needs to score all documents which defeats the purpose of the rescorer. Maybe we should simply fail or document the fact that |
In our use case we use the main query as a blocking step to retrieve good candidates for a more computationally intensive rescore function (in a custom plugin). Running the function over all the documents in the index isn't feasible, nor can we accomplish our blocking query as a pre-filter. Part of our application needs to retrieve all documents that score above a certain threshold after applying that rescore function. Sometimes the number of documents above the threshold is large enough that I assume scrolling would be more efficient than paging, at least as I understand it. I admit I have not done any benchmarking to verify this assumption. |
Scrolling is faster than simple pagination but the issue I have with rescored scroll is that it breaks the |
We've decided to forbid scroll with rescores, it used to work in 5x but should be considered as a bug since it breaks the sort. Though we should fail the creation of the scroll instead of silently ignoring the scorers as we do today which is why I am marking this issue as an adoptme. |
This PR changes our behavior from silently ignoring rescore in a scroll query to instead report to the user that such a query is invalid. Closes elastic#31775
Elasticsearch version (
bin/elasticsearch --version
):Elasticsearch 6.3.0
Plugins installed: []
None
JVM version (
java -version
):java version "1.8.0_171"
OS version (
uname -a
if on a Unix-like system):Darwin mbp-bsawy-5018 17.6.0 Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64
Description of the problem including expected versus actual behavior:
Performing a query using the Scroll API does not apply the 'rescore' portion of the query.
Steps to reproduce:
This appears to affect all 6.* versions of Elasticsearch but is not present in 5.*
The text was updated successfully, but these errors were encountered: