[Zope-CMF] How to limit results in AdvancedQuery

Dinh Trung Viet vietdt at tinhvan.com
Thu Sep 9 03:23:09 EDT 2004


Hi,

Sometimes I want to limit results from a catalog query. But I can't find any way to do it with AdvancedQuery.

In a traditional query, I can use 'sort_limit' to do that. It looks like:

results = context.portal_catalog(sort_order='modified', sort_limit=5)

I think this will save time and memory. But in AdvancedQuery, sorting time was reduced so is it necessary to limit results after sorting and if yes, how to do it??

Thanks,

Vietdt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope-cmf/attachments/20040909/a93ab625/attachment.htm


More information about the Zope-CMF mailing list