Hi, On Wed, Mar 28, 2007 at 03:55:28PM +0000, Alek Kowalczyk wrote: > Hi, > I'm trying to index a boolean field of some object, to simplify retrieving all > the objects which have some flag turned on. > > I am adding in proper place the index: > > catalog['anomaly'] = FieldIndex('anomaly', IMyObject) > > But then, when I try to get the objects using the following command, I get an > exception. Is FieldIndex able to index bool field? If not, how to create own > index for doing that? > > anomalies = catalog.searchResults(anomaly=True)
[snip] > TypeError: len() of unsized object A fieldindex always requires a lower and an upper boundary, found objects must fit into. Try catalog.searchResults(anomaly=(True,True)) BTW: The error is raised because the fieldindex tries to interpret 'True' as a tuple. Regards, Frank _______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users