RE: [Zope] ZCatalog with OR expression
If this helps, ***within a single index***, dtml-in does "lazy concatenation" which works ok. Example query: http://classifieds.uniontrib.com/8000/results?displaymode=browse&getSection= 8572&sort_on=summaryfield&adDate:date=10-13-2001&adDate:date=10-14-2001 In this query, the adDate index is used twice, and 2 catalog queries are performed by the dtml-in iteration machinery, and concatenated together, and sorted together by dtml-in... I think that Casey's CatalogQuery product might give you OR across certain fields, but I'm not sure if there are any "perfect" solutions. Sean -----Original Message----- From: Garikoitz Araolaza [mailto:gari@eibar.org] Sent: Thursday, October 18, 2001 9:37 AM To: zope@zope.org 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 )
participants (1)
-
sean.upton@uniontrib.com