[Zope-CVS] CVS: Products/ZCTextIndex - OkapiIndex.py:1.29

Fred L. Drake, Jr. fdrake@acm.org
Wed, 29 May 2002 16:47:45 -0400


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

Modified Files:
	OkapiIndex.py 
Log Message:
_search_wids(): Move the import of okascore out of the function so
    so the import machinery is not invoked on each call.


=== Products/ZCTextIndex/OkapiIndex.py 1.28 => 1.29 ===
                                            inverse_doc_frequency, \
                                            scaled_int
+from Products.ZCTextIndex.okascore import score
 
 class OkapiIndex(BaseIndex):
 
@@ -117,7 +118,6 @@
     # Cautions:  okascore hardcodes the values of K, B1, and the scaled_int
     # function.
     def _search_wids(self, wids):
-        from Products.ZCTextIndex.okascore import score
         if not wids:
             return []
         N = float(len(self._docweight))  # total # of docs