On Wed, Mar 28, 2007 at 03:55:28PM +0000, Alek Kowalczyk wrote:
> 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)
> TypeError: len() of unsized object
A fieldindex always requires a lower and an upper boundary, found objects must
BTW: The error is raised because the fieldindex tries to interpret 'True'
as a tuple.
Zope3-users mailing list