[Zope-Checkins] CVS: Zope2 - TextIndex.py:1.1.2.19

andreas@serenade.digicool.com andreas@serenade.digicool.com
Tue, 22 May 2001 13:45:14 -0400


Update of /cvs-repository/Zope2/lib/python/Products/PluginIndexes/TextIndex
In directory serenade:/tmp/cvs-serv19409/TextIndex

Modified Files:
      Tag: ajung-dropin-registry
	TextIndex.py 
Log Message:
fixes



--- Updated File TextIndex.py in package Zope2 --
--- TextIndex.py	2001/05/22 17:02:07	1.1.2.18
+++ TextIndex.py	2001/05/22 17:45:14	1.1.2.19
@@ -85,7 +85,7 @@
 
 """Text Index
 
-The UnTextIndex falls under the 'I didnt have a better name for it'
+The TextIndex falls under the 'I didnt have a better name for it'
 excuse.  It is an 'Un' Text index because it stores a little bit of
 undo information so that objects can be unindexed when the old value
 is no longer known.
@@ -430,7 +430,7 @@
         for wid in wids:
             widScores = get(wid, None)
             if widScores is None:
-                LOG('UnTextIndex', ERROR,
+                LOG('TextIndex', ERROR,
                     'unindex_object tried to unindex nonexistent'
                     ' document, wid  %s, %s' % (i,wid))
                 continue
@@ -448,7 +448,7 @@
                     else:
                         del index[wid]
                 except (KeyError, IndexError, TypeError):
-                    LOG('UnTextIndex', ERROR,
+                    LOG('TextIndex', ERROR,
                         'unindex_object tried to unindex nonexistent'
                         ' document %s' % str(i))
 
@@ -511,12 +511,13 @@
         """
 
         record = parseIndexRequest(request,self.id)
+        if record.keys==None: return None
 
         # Changed for 2.4
         # We use the default operator that can me managed via the ZMI
 
         query_operator = record.get('operator',self.useOperator)
-        if not query_operator in self.operators:
+        if not query_operator in self.operators.keys():
             raise exceptions.RuntimeError,"Invalid operator '%s' for a TextIndex" % query_operator
 
         # We keep this for pre-2.4 compatibility