[Zope] Searching a Catalog in Zope 2.6.1b1

Peter Bengtsson mail@peterbe.com
Wed, 08 Jan 2003 01:26:22 +0000


I have started testing my product in Zope 2.6.1b1 and notice an odd behaviour

My code looks something like this:

catalog = self.ICatalog # an instance of ZCatalog called ICatalog I have

results1 = catalog()
print results1 # returns 25 as expected

results2 = catalog({'email':'peter'})

# ...in Zope 2.5.0
print len(results2)  # returns 2 as expected

# ...in Zope 2.6.1b1
print len(results2)  # returns 25, i.e. as if the 'email' index is ignored!!!


Why this strange behaviour? A bug in Zope2.6.1b1 ?
How do I go around it?

I tried the mailinglist but failed to find the discussion. I also tried 
inspecting the code but didn't understand anything.


Peter