[Zope] ZCatalog with OR expression

Frank McGeough fm@synchrologic.com
Thu, 18 Oct 2001 12:51:39 -0400


Have you looked at :

http://www.zope.org/Members/Zen/howto/AdvZCatalogSearching

it might be helpful.

----- Original Message -----
From: "Garikoitz Araolaza" <gari@eibar.org>
To: <zope@zope.org>
Sent: Thursday, October 18, 2001 12:37 PM
Subject: [Zope] ZCatalog with OR expression


> Hi!
>
> I'm trying to get an OR expression from a catalog:
>
> For example:
>
> <dtml-in "Catalog(meta_type='Image', title='Z*')">
>
> So, this way I'm having objects with meta_type='Image' AND title starting
> with Z.
>
> Now, I need an OR expression:
>
> I need cataloged objects with meta_type='Image' OR with title='Z*'
>
> This can be done adding "two Catalogs:
>
> <dtml-in "Catalog(meta_type='Image')+Catalog(title='Z*')">
>
> But... this way I get some objects two times: the ones filling both
> expressions.
>
> How could this be done better?
>
> Thanks if somebody can help...
>
> Gari
>
> PS: The real case is more complicated, I'm searching dates between
> ranges... but I think that the problem is the basic solution... Thank you.
>
> _________________________________________________________
> Aurki Euskara hutsezko bilatzailea
> http://www.aurki.com
> Zure laguntza behar dugu. Egin zaitez editore!
>
>
> _______________________________________________
> 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 )