[Zope] How to join/add ZCatalog.searchResults?
Michael Gutmann
gutmann@uni-duesseldorf.de
Fri, 15 Oct 1999 15:01:38 +0200
<...>
>Try: title_search[:] + data_search[:]. The result object from a Catalog
>query supports slicing, and this also works when there is only one result
>(because then the returned set is just a python list).
>
>ZCatalog uses an object that avoids loading the whole result list into
>memory if it possibly can help it. Above solution will completely destroy
>this effort of course.
>
>--
>Martijn Pieters, Web Developer
Hmm, no chance, Zope complains with:
Error Type: MemoryError
Error Value:
that seems to be raised by the controlling method you mentioned
File /www/WWW/Zope/2.0.1/lib/python/DocumentTemplate/DT_Util.py, line 170, in careful_getslice
File /www/WWW/Zope/2.0.1/lib/python/Products/ZCatalog/Lazy.py, line 109, in __getslice__
MemoryError: (see above)
and there ist only one item in each searchResult.
Are the searchResult objects that big, that there has to be such a restriction?
Michael Gutmann
gutmann@uni-duesseldorf.de