Commit 053276cf authored by Casey Duncan's avatar Casey Duncan

merge changes from scored results mergable branch.

parent 8430ae6c
...@@ -493,8 +493,15 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -493,8 +493,15 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
# having a 'values' means we have a data structure with # having a 'values' means we have a data structure with
# scores. Build a new result set, sort it by score, reverse # scores. Build a new result set, sort it by score, reverse
# it, compute the normalized score, and Lazify it. # it, compute the normalized score, and Lazify it.
# For now we cannot return raw scores for later merging :^( if not merge:
# Don't bother to sort here, return a list of
# three tuples to be passed later to mergeResults
# note that data_record_normalized_score_ cannot be
# calculated and will always be 1 in this case
getitem = self.__getitem__
return [(score, (1, score, rid), getitem)
for rid, score in rs.items()]
rs = rs.byValue(0) # sort it by score rs = rs.byValue(0) # sort it by score
max = float(rs[0][0]) max = float(rs[0][0])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment