[Zope-CVS] CVS: Products/ZCTextIndex - OkapiIndex.py:1.3
Guido van Rossum
guido@python.org
Tue, 14 May 2002 12:21:57 -0400
Update of /cvs-repository/Products/ZCTextIndex
In directory cvs.zope.org:/tmp/cvs-serv28331
Modified Files:
OkapiIndex.py
Log Message:
Fix _union() -- it wasn't getting what it expected from pop_smallest()
inside the while loop either.
=== Products/ZCTextIndex/OkapiIndex.py 1.2 => 1.3 ===
while len(merge) > 1:
# Merge the two smallest so far, and add back to the queue.
- x, wx = merge.pop_smallest()
- y, wy = merge.pop_smallest()
+ (x, wx), dummy = merge.pop_smallest()
+ (y, wy), dummy = merge.pop_smallest()
dummy, z = weightedUnion(x, y, wx, wy)
merge.add((z, 1), len(z))
(result, weight), score = merge.pop_smallest()