-
Notifications
You must be signed in to change notification settings - Fork 11
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
Be able to export a full list of media clusters. #2024
Conversation
The current export limit for media lists is 10.000 because this is the maximum size of a result window in ElasticSearch. The solution is to paginate the results. Fixes: CV2-5205.
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.
@caiosba to get all existing items not recommended to use pagination as maximum item to get through pagination is 10.000 items but you should iterated using search_after
option this is a reference to get items using search_after
Thanks Sawy, I'll make this change! |
As long as this offset/limit syntax works it otherwise looks good to me:
|
Thanks @melsawy ! Indeed, I tested it locally with more than 20.000 items and my previous approach only exported 10.000, with no alerts from ElasticSearch. I re-implemented it using Kindly re-review, @melsawy :) |
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 and I suggest to use do..whileLoop
instead of while true
to fix CC issue
The current export limit for media lists is 10.000 because this is the maximum size of a result window in ElasticSearch. The solution is to paginate the results. Fixes: CV2-5205.
Description
The current export limit for media lists is 10.000 because this is the maximum size of a result window in ElasticSearch. The solution is to paginate the results.
Fixes: CV2-5205.
How has this been tested?
This is just a refactoring, the existing test should cover it.
Checklist