AW: [Zope] Searching the Catalog

Oleg Broytmann Oleg Broytmann <phd@mail2.phd.pp.ru>
Wed, 21 Mar 2001 17:02:54 +0300 (MSK)


On Wed, 21 Mar 2001, Marc Fischer wrote:
> Here is my report form:
> --------------------------------
>
> <dtml-var standard_html_header>
>
>
> <dtml-with NewsItems>
>
> <dtml-in Catalog size=50 start=query_start>

   The idea is to call the Catalog with indicies and values. You can do AND
search this way:

   <dtml-in "Catalog(title='Title', body='Modie')" size=50 start=query_start>
("title" and "body" are the names of indicies you have in the Catalog)

and your can do OR search this way:

   <dtml-in "Catalog(title='Title') + Catalog(body='Modie')" size=50 start=query_start>
(I hope you understand the difference between AND and OR searches)

The OR search, perhaps, will return duplicate results. There are ways to
avoid them, but I only want to show you the idea in simple words.

   BTW, do you know every page on zope.org has "View DTML source" link? I
stole catalog seraching there! :)

Oleg.
----
     Oleg Broytmann     http://www.zope.org/Members/phd/     phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.