[Zope-CVS] CVS: Products/ZCTextIndex - BaseIndex.py:1.3 CosineIndex.py:1.7 OkapiIndex.py:1.14

Tim Peters tim.one@comcast.net
Thu, 16 May 2002 23:07:50 -0400


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

Modified Files:
	BaseIndex.py CosineIndex.py OkapiIndex.py 
Log Message:
_get_undoinfo:  Got rid of this everywhere.  It was just a synonym for
get_words, and in calling contexts nothing but a list of wids could
possibly make sense.


=== Products/ZCTextIndex/BaseIndex.py 1.2 => 1.3 ===
         # index knows about but we don't).  A word is in-vocabulary for
         # this index if and only if _wordinfo.has_key(wid).  Note that
-        # wid 0 most not be a key in _wordinfo.
+        # wid 0 must not be a key in _wordinfo.
         self._wordinfo = IOBTree()
 
         # docid -> WidCode'd list of wids
@@ -193,10 +193,6 @@
                 new[k] = v
             map = new
         self._wordinfo[wid] = map # Not redundant, because of Persistency!
-
-    # Used only by tests.
-    def _get_undoinfo(self, docid):
-        return WidCode.decode(self._docwords[docid])
 
 def inverse_doc_frequency(term_count, num_items):
     """Return the inverse doc frequency for a term,


=== Products/ZCTextIndex/CosineIndex.py 1.6 => 1.7 ===
 
     def unindex_doc(self, docid):
-        for wid in self._get_undoinfo(docid):
+        for wid in self.get_words(docid):
             self._del_wordinfo(wid, docid)
         del self._docwords[docid]
         del self._docweight[docid]
@@ -218,9 +218,6 @@
 
     def _add_undoinfo(self, docid, wids):
         self._docwords[docid] = WidCode.encode(wids)
-
-    def _get_undoinfo(self, docid):
-        return WidCode.decode(self._docwords[docid])
 
     # The rest are helper methods to support unit tests
 


=== Products/ZCTextIndex/OkapiIndex.py 1.13 => 1.14 ===
         self._wordinfo[wid] = map # Not redundant, because of Persistency!
 
-    # Used only by tests.
-    def _get_undoinfo(self, docid):
-        return WidCode.decode(self._docwords[docid])
-
 def inverse_doc_frequency(term_count, num_items):
     """Return the inverse doc frequency for a term,