[Zope-Checkins] CVS: Products/PluginIndexes/common - util.py:1.7
andreasjung@cvs.baymountain.com
andreasjung@cvs.baymountain.com
Wed, 25 Jul 2001 09:30:05 -0400
Update of /cvs-repository/Products/PluginIndexes/common
In directory cvs.zope.org:/tmp/cvs-serv402/lib/python/Products/PluginIndexes/common
Modified Files:
util.py
Log Message:
- Collector #2423: Searching a FieldIndexes for documents
with a blank string has been broken.
=== Products/PluginIndexes/common/util.py 1.6 => 1.7 ===
setattr(self, op, request[field])
- if keys is not None:
- # Filter out empty strings.
- keys = filter(lambda key: key != '', keys)
+ # This was some kind of over-optimimization and broke
+ # queries with ("",) to search for empty fields
+ # (See Collector 2423)
+
+# if keys is not None:
+# # Filter out empty strings.
+# keys = filter(lambda key: key != '', keys)
+
if not keys:
keys = None
@@ -219,7 +224,7 @@
def test():
- r = parseIndexRequest({'path':{'query':"xxxx","level":2,"operator":'and'}},'path',['query',"level","operator"])
+ r = parseIndexRequest({'path':{'query':"","level":2,"operator":'and'}},'path',['query',"level","operator"])
for k in dir(r):
print k,getattr(r,k)