[Zope] Restricting the size of results returned by the Catalog

Toby Dickenson tdickenson@geminidataloggers.com
Fri, 13 Sep 2002 13:39:18 +0100


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]