[Zope] ZCatalog - perfoming an or operation on different columns

Marcos Iuato marcos@hiper.com.br
Mon, 22 Jul 2002 16:58:12 -0300


This is a multi-part message in MIME format.

------=_NextPart_000_031D_01C231A0.F6EAB320
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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=3D"Catalog(meta_type=3D['DTML Method','ZCatalog'])"
              resb=3D"Catalog(title=3D'Song')"
              res=3D"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 + =
resb ?
Regards
Marcos Iuato



------=_NextPart_000_031D_01C231A0.F6EAB320
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>To perform a search in zcatalog in a =
different=20
colums with an or operation,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I&nbsp;am joining the results lists =
with the=20
following code:</FONT></DIV>
<DIV><PRE>    &lt;dtml-let resa=3D"Catalog(meta_type=3D['DTML =
Method','ZCatalog'])"
              resb=3D"Catalog(title=3D'Song')"
              res=3D"resa[:_.len(resa)] + resb[:_.len(resb)]"&gt;
      &lt;dtml-in res&gt;
        A Match: &lt;dtml-var =
"Catalog.getpath(data_record_id_)"&gt;&lt;br&gt;
      &lt;/dtml-in&gt;
    &lt;/dtml-let&gt;

But how can I avoid the duplicated matches of a results list from resa + =
resb ?</PRE><PRE>Regards</PRE><PRE>Marcos =
Iuato</PRE><PRE>&nbsp;</PRE></DIV></BODY></HTML>

------=_NextPart_000_031D_01C231A0.F6EAB320--