[Zope] zcatalog search limitations?

Christopher N. Deckard cnd@ecn.purdue.edu
Fri, 08 Feb 2002 16:43:26 -0500


Andreas Jung wrote:

> > I've begun using ZCatalogs and I really like them.  I've run into a
> > problem though.  I've indexed about 10,000 folders, and I'm trying to
> > query using the "path" to the objects.  It seems like I can only look in a
> > maximum of 32 paths before I get a Zope error (error traceback at the
> > bottom).
> 
> There should not be such a limitiation ;-)

I didn't figure there should be, but there is.  :-)

> > Are there any ideas on how to get around this limitation?  I'm going to
> > try and figure out where this error message is getting thrown, but my
> > first glance into the PluginIndexes/PathIndex source didn't get me very
> > far.
> 
> Is there a way to reproduce the problem ? How does your query look like ?
> I suggest to submit this issue to the Zope collector otherwise it might
> get lost of my mind.

I can reproduce it like this:

Index on a zcatalog object has a PathIndex index called "path".

My query looks like this:

query = {}
query['path'] = [list with > 32 elements]

zcatalog.searchResults(query)

And I get the error message:

Error Type: TypeError
Error Value: invalid argument

I checked, and there are no duplicate elements (though I don't think
that should matter).  My searchResults() works on anything else that
has less than 32 elements in the path list.   I haven't tried it for
the other indexes.

I'll post to the Zope collector now.

-Chris