-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BUG] Scroll API returns a recently deleted doc #7266
Comments
Hi @Yury-Fridlyand, thanks for reporting it. Based on my understanding, seems this is an expected behavior, scroll api works as point on time search. please let me know if you still think it is a bug. |
Hi @anasalkouz, thank you for reply! |
@Yury-Fridlyand Can you help understand the usecase for this API, where and how it would be used ? |
@Yury-Fridlyand Thats fair point, this should be clearly documented. Once it's confirm, I think we can transfer this to documentation. |
@anasalkouz Lets prioritize this Scroll API ask. Is it possible to estimate the work on it |
Issue update: added docs are also ignored by scroll.
Actually it is not a real use-case. I'm working on cursor feature in SQL plugin which uses scroll to paginate the results. I tried to test index modification during paging and found this issue. Maybe it is my misunderstanding the scroll feature. Please, clarify how scroll works, whether it makes an index snapshot or not. We can fix this issue and/or update the documentation. Thanks. |
Scroll under the hood creates search contexts which are references to the associated index segments at the time of scroll creation. So the data returned will always be the from the same segments, providing a 'point in time' snapshot view for the query. The updates to opensearch such as create doc, delete doc etc will not be reflected in the scroll. In the documentation, I see the relevant doc for the same ( applicable for docs deleted after the timestamp as well )
|
Describe the bug
Scroll API returns a doc which was deleted while scrolling if it goes next.
To Reproduce
Steps to reproduce the behavior:
Note:
refresh=true
5. Keep scrolling
Expected behavior
Search should skip deleted doc
Host/Environment (please complete the following information):
3.0.0-SHAPSHOT @ ee305d0
Additional context
Sometimes this doesn't happen if I delete a doc 3 when cursor is between 1 and 2. Timing?
The text was updated successfully, but these errors were encountered: