[Zope] Searching Multiple Fields in ZCatalog

Bak @ kedai kedai@kedai.com.my
Sat, 30 Mar 2002 11:13:41 +0800


>I'm sure this has been covered, but I can't find an answer.
>
>I need to perform a search across three different fields in my zcatalog.
>Currently, the only way I can see to do this is with three distinct form
>fields. I wish to have my users enter their query in only one form field,
>and still search each of the three zcatalog indices.
>
>Any suggestions?

zope 2.5.1b1
in pythonscript, concat the result of the query like so

o=getattr(context,'Catalog')
r=o(index1={'query':'myquery'}) + o(index2={'query':'query2'})
return r

there maybe better ways, but thsi is how i did it

hth

>
>Thanks,
>
>Aaron
>
>_______________________________________________
>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 )
>