[Zope-CVS] CVS: Products/ZCTextIndex - CosineIndex.py:1.16

Tim Peters tim.one@comcast.net
Fri, 17 May 2002 02:27:14 -0400


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

Modified Files:
	CosineIndex.py 
Log Message:
Got rid of _add_undoinfo; it's clearer to do the one-liner inline.


=== Products/ZCTextIndex/CosineIndex.py 1.15 => 1.16 ===
             self._add_wordinfo(uniqwids[i], freqs[i], docid)
         self._docweight[docid] = docweight
-        self._add_undoinfo(docid, wids)
+        self._docwords[docid] = WidCode.encode(wids)
         return len(wids)
 
     def _search_wids(self, wids):
@@ -135,9 +135,6 @@
             weights[i] = scaled_int(weights[i] / W)
             #print "->", weights[i]
         return d.keys(), weights, scaled_int(W)
-
-    def _add_undoinfo(self, docid, wids):
-        self._docwords[docid] = WidCode.encode(wids)
 
     # The rest are helper methods to support unit tests