[ZWeb] Re: Catalog Searching

Maik Roeder roeder@berg.net
Wed, 20 Sep 2000 20:29:08 +0200


Hi Chris

Chris Withers wrote:
> 
> Maik Roeder wrote:
> > <dtml-in "Catalog()" reverse sort=bobobase_modification_time size=50>
> > Show stuff in Catalog here.
> > </dtml-with>
> 
> That doesn't take advantage of the Catalog's lazy searching, AFAIK, and
> on a site with a lot of content that could be bad.

I have a demo up:

http://www.zope.org/Members/roeder/whats_new

That's the code:

<B>What's new ?</B>

<dtml-with "PARENTS[-1].SiteIndex">
 <dtml-call "REQUEST.set('sort_on', 'date')">
 <dtml-call "REQUEST.set('sort_order', 'reverse')">
 <dtml-call "REQUEST.set('bobobase_modification_time', _.DateTime()-1)">
 <dtml-call "REQUEST.set('bobobase_modification_time_usage', 'range:min')">
 <dtml-with "_(results = searchResults(REQUEST=REQUEST))">

<UL>
<dtml-in results>
<dtml-with "getobject(data_record_id_)">
<LI><dtml-var bobobase_modification_time> <B><dtml-var meta_type>:</B> <A HREF="<dtml-var "absolute_url()">"><dtml-var "absolute_url()"></A> <dtml-var title>
</dtml-with>
</dtml-in>
</UL>

</dtml-with>
</dtml-with>

Is there a problem with this solution ? Does it take too long on
Zope.org ? 

Regards,

Maik Röder

-- 
Uzopia - Digging la vida Zopa - http://uzopia.editthispage.com