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

Guido van Rossum guido@python.org
Fri, 10 May 2002 21:03:24 -0400


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

Modified Files:
      Tag: TextIndexDS9-branch
	Index.py ZCTextIndex.py 
Log Message:
Get rid of threshold argument to index_doc().  A YAGNI if I ever saw one. :-)

=== Products/ZCTextIndex/Index.py 1.1.2.38 => 1.1.2.39 ===
     #        computed by self.query_weight()
 
-    def index_doc(self, docid, text, threshold=None):
+    def index_doc(self, docid, text):
         wids = self._lexicon.sourceToWordIds(text)
         uniqwids, freqs, docweight = self._get_frequencies(wids)
         for i in range(len(uniqwids)):


=== Products/ZCTextIndex/ZCTextIndex.py 1.1.2.20 => 1.1.2.21 ===
         self.parser = QueryParser()
 
-    def index_object(self, docid, obj, thresh=None):
-        self.index.index_doc(docid, self._get_object_text(obj), thresh)
+    def index_object(self, docid, obj):
+        self.index.index_doc(docid, self._get_object_text(obj))
         self._p_changed = 1 # XXX
 
     def unindex_object(self, docid):