-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Throw exception in scroll requests using from
#26235
Conversation
The `from` search parameter cannot really be used in scrolled searches. This commit adds a check for this case to the SearchRequest#validate() method so we can reported it as an error rather than silently ignoring it. Closes elastic#9373
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - we should maybe add a note into the migration guide!
@s1monw thanks, I also had to adapt a failing rest test that used "from" in a scroll. Maybe you or @nik9000 (who seems to have added it) can recheck that this change is okay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm cool with the change and the test change.
@s1monw I'll merge this into 7.0 and add a migration note and add the breaking label in a separate PR for 6.0/6.x, is that okay with you? |
This commit builds on elastic#26235, and adds the same validation to the builder so that it will throw an exception when setting a scroll on a request that has from set. Relates elastic#9373 Closes elastic#44493
According to the discussion in #9373, the
from
search parameter cannot really be used with scrolled searches.This commit adds a check for this case to the SearchRequest#validate() method so we can reported it as an
error rather than silently ignoring it.
Closes #9373