Skip to content
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

sort-on multiple indexes is broken#81 #82

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
7 changes: 5 additions & 2 deletions src/Products/ZCatalog/Catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,11 @@ def _sort_nbest_reverse(self, actual_result_count, result, rs,
# This document is not in the sort key index, skip it.
actual_result_count -= 1
else:
if n >= limit and key >= best:
continue
try:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar code is present in the companion _sort_nbest, too. If the change is necessary here, almost surely, it will be necessary there as well.

if n >= limit and key >= best:
continue
except:
pass
i = bisect(keys, key)
keys.insert(i, key)
result.insert(i, (full_key, did, self.__getitem__))
Expand Down
Loading