Re: [Zope] ZCatalog - perfoming an or operation on different columns
I will try your CatalogQuery product
Thanks.
----- Original Message ----- From: "Casey Duncan" <casey@zope.com> To: "Marcos Iuato" <marcos@hiper.com.br>; <zope@zope.org> Sent: Monday, July 22, 2002 8:20 PM Subject: Re: [Zope] ZCatalog - perfoming an or operation on different columns
If you install my CatalogQuery product you can write:
Catalog.query('meta_type==['DTML Method','ZCatalog'] or title==``song``')
It will not return any dupes.
Also, this:
<dtml-var "Catalog.getpath(data_record_id_)">
Can be replaced by:
<dtml-var getURL>
see: http://www.zope.org/Members/Caseman/ZCatalog_for_2.3
hth,
-Casey
On Mon, 22 Jul 2002 16:58:12 -0300 "Marcos Iuato" <marcos@hiper.com.br> wrote:
To perform a search in zcatalog in a different colums with an or operation, I am joining the results lists with the following code: <dtml-let resa="Catalog(meta_type=['DTML Method','ZCatalog'])" resb="Catalog(title='Song')" res="resa[:_.len(resa)] + resb[:_.len(resb)]"> <dtml-in res> A Match: <dtml-var "Catalog.getpath(data_record_id_)"><br> </dtml-in> </dtml-let>
But how can I avoid the duplicated matches of a results list from resa
I am using your CatalogQuery Product and I have a dubt to how make a expression to pass to the method query. If I write aexpression mixing "and , or " operator does it works? Example: expression = """caminho_secao==('bb3', 'intranet', 'trabalho', 'arquivo', 'pessoa_fisica', 'personal', 'cambio') and data_expiracao <= '2002/07/24 16:00:10.573 Brazil/East' and data_publicacao >= '2002/07/24 16:00:10.574 Brazil/East' and status=='PUBLICADA' or titulo=='teste' or area_reponsavel=='teste' or categoria=='teste' or idioma=='teste' or sumario=='teste' or descricao=='teste' or titulo_chamada_portal=='teste' or pergunta=='teste' or respostas=='teste' or corpo=='teste' or objetivo=='teste' or produtos=='teste' or publico=='teste' or mensagem=='teste' """ Catalog.query(expression) Thanks Marcos Iuato ----- Original Message ----- From: "Marcos Iuato" <marcos@hiper.com.br> To: "Casey Duncan" <casey@zope.com> Sent: Monday, July 22, 2002 8:48 PM Subject: Re: [Zope] ZCatalog - perfoming an or operation on different columns +
resb ? Regards Marcos Iuato
participants (1)
-
Marcos Iuato