-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fix reversed sorting by multiple index + limit #120
Conversation
Fix reversed sorting by multiple index by forcing the ``_sort_iterate_resultset`` sorting method when we have more than one sorting index Fixes #108
Without this patch the added test fails like:
|
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 don't have any knowledge about the inner workings of ZCatalog, so I hope Dieter has better input. The unit test appears to show that your changes work, that's all I can go by.
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.
The change is obviously safe - but it may disregard optimization potential: reverse sorting can be optimized in the same way as forward sorting and multi-index sorting can be optimized recursively.
I would merge this because it fixes an issue observed by many people, even if it might cost some CPU cycles. I see #82 looks promising performance wise, but it seems to me it requires still some work before it gets merged. Should I backport this patch to the 5.x branch? |
Thanks for the reviews! |
Unless there's someone is specifically asking for it I wouldn't bother. |
@ale-rt backport for 5.x would be great, since we're using that 5.x for Plone 5.2.x |
@agitator yeah I know, anyway I think we can even switch to latest master, I do not see it so hard |
Fix reversed sorting by multiple index by forcing the
_sort_iterate_resultset
sorting method when we have more than one sorting indexFixes #108