[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndexNG - TextIndexNG.py:1.2.2.50

Andreas Jung andreas@digicool.com
Sat, 2 Mar 2002 12:31:40 -0500


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndexNG
In directory cvs.zope.org:/tmp/cvs-serv14300

Modified Files:
      Tag: ajung-textindexng-branch
	TextIndexNG.py 
Log Message:
minor fixes


=== Zope/lib/python/Products/PluginIndexes/TextIndexNG/TextIndexNG.py 1.2.2.49 => 1.2.2.50 ===
 
         if self.useConverters:
-            mimetype = guess_content_type(source, obj.getId())
-            
-            converter = ConverterRegistry.getConverterFor( mimetype )
+            mimetype,enc  = guess_content_type(obj.getId(), source)
+            converter = ConverterRegistry.Registry.getConverterFor( mimetype )
             if converter:
                 source = converter(source)
 
@@ -554,7 +553,7 @@
         txN = self.txNear
         txQ = self.txQuote
 
-        debug('Query: ',q, query_operator)
+        debug('Query: %s, Operator: %s' %(q, query_operator))
 
         if self.useDumbParser:
             parsed_query = DumbQueryParser()(q, query_operator)
@@ -889,14 +888,15 @@
     # Testing 
     ###################################################################
 
-    def testTextIndexNG(self, query, REQUEST=None, RESPONSE=None):
+    def testTextIndexNG(self, query, operator, REQUEST=None, RESPONSE=None):
         """ test the TextIndexNG """
 
         from cStringIO import StringIO
 
         self.createShortcuts()
 
-        res = self.catalog.searchResults({ self.id: {'query': query} } )
+        res = self.catalog.searchResults({ self.id: {'query': query,
+                                                     'operator': operator} } )
 
         IO = StringIO()
         IO.write("<p>%d hits\n</p>" % len(res) )