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!
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 )
At 18:51 18/10/01, you wrote:
Have you looked at :
http://www.zope.org/Members/Zen/howto/AdvZCatalogSearching
it might be helpful.
You're right. I'm using this how-to the whole day, and I didn't see it... (I must be getting blind) Thank you! But it still doesn't work. Objects filling both conditions appear two times in the final selection. :-( Gari _________________________________________________________ Aurki Euskara hutsezko bilatzailea http://www.aurki.com Zure laguntza behar dugu. Egin zaitez editore!
On Thursday 18 October 2001 12:37 pm, Garikoitz Araolaza allegedly wrote:
Hi!
I'm trying to get an OR expression from a catalog:
You can use my CatalogQuery product to do this: http://www.zope.org/Members/Kaivo/CatalogQuery or you can write a custom external method to perform the propery queries and union the results. I can help with this method if you desire. /---------------------------------------------------\ Casey Duncan, Sr. Web Developer National Legal Aid and Defender Association c.duncan@nlada.org \---------------------------------------------------/
participants (3)
-
Casey Duncan -
Frank McGeough -
Garikoitz Araolaza