Restricting the size of results returned by the Catalog
Hi, Is there a parameter you can pass to the catalog in a query to return the results as soon as a maximum results size is reached? Rather than the catalog returning say 3000 results and you want to restrict results to the first 500? I'm running zope 2.5.1, python 2.1.3, testing on win2000. Thanks for any help. Richard __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com
On Friday 13 Sep 2002 1:25 pm, Lea Smith wrote:
Hi,
Is there a parameter you can pass to the catalog in a query to return the results as soon as a maximum results size is reached? Rather than the catalog returning say 3000 results and you want to restrict results to the first 500?
Just slice. catalog.search_results(whatever)[:500]
participants (2)
-
Lea Smith -
Toby Dickenson