AW: AW: [Zope] Searching the Catalog

Marc Fischer marcbpc@gmx.de
Wed, 21 Mar 2001 16:00:15 +0100


Hi,

<dtml-in "Catalog(Titel='hello', Vorschau='World')" size=50
start=query_start>

works fine. But with the OR search a get some trouble. If I try:

<dtml-in "Catalog(Titel='hello') + Catalog(Vorschau='world')" size=50
start=query_start>

.. I get the message:

Error Type: TypeError
Error Value:__add__nor_radd__defined for these operands

Someone an idea??

Marc


> -----Ursprungliche Nachricht-----
> Von: zope-admin@zope.org [mailto:zope-admin@zope.org]Im Auftrag von Oleg
> Broytmann
> Gesendet: Mittwoch, 21. Marz 2001 15:03
> An: Marc Fischer
> Cc: zope@zope.org
> Betreff: Re: AW: [Zope] Searching the Catalog
>
>
> 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.
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>