[Zope-CVS] CVS: Products/ZCTextIndex - Index.py:

Guido van Rossum guido@python.org
Tue, 7 May 2002 21:04:43 -0400

Update of /cvs-repository/Products/ZCTextIndex
In directory cvs.zope.org:/tmp/cvs-serv21625

Modified Files:
      Tag: TextIndexDS9-branch
Log Message:
search(): use an IIBTree to hold the result (if non-trivial).  This
doesn't really save much time but it could save space since a BTRee's
items() returns an iterator but a Bucket's items() returns a real

=== Products/ZCTextIndex/Index.py => ===
             L.append((d2w, scaled_int(idf)))
         L.sort(lambda x, y: cmp(len(x[0]), len(y[0])))
-        result = IIBucket()
+        result = IIBTree()
         for d2w, weight in L:
             dummy, result = weightedUnion(result, d2w, 1, weight)
         return result