[Zope] Searching the Catalog

Geir Bækholt Geir Bækholt <geirh@funcom.com>
Wed, 21 Mar 2001 12:10:46 +0100


the neatest way would be to edit your zclass and the catalog :

make a python-script named for example "allText" in your zclass containing the following :

return context.field1 + context.field2 + context.field3
(this has to be done with pythonmethods in versions prior to 2.3)

where field# is the name of your zclass attributes
next make a textindex in your catalog named allText , and set up your
input form to use this field (which should now contain text from all
your attributes)

good luck
:-)


--
Geir Bækholt
web-developer/designer
geirh@funcom.com
http://www.funcom.com

on or about, Wednesday, March 21, 2001, we have reason to believe that Marc Fischer wrote something in the lines of :
MF> Hello, ..

MF> new day, new questions :-)

MF> A have a ZCatalog where instances of my zclass are cataloged. I added a
MF> search interface, and got three different input fields for searching three
MF> different attributes of the zclass.

MF> Now my question:

MF> I want to have only one input field, for searching all the three attributes.

MF> What syntax do I need? I have no idea where to place this syntax - in the
MF> searchform or reportform?

MF> Hopefully someone understands my question ...


MF> Marc



MF> _______________________________________________
MF> Zope maillist  -  Zope@zope.org
MF> http://lists.zope.org/mailman/listinfo/zope
MF> **   No cross posts or HTML encoding!  **
MF> (Related lists - 
MF>  http://lists.zope.org/mailman/listinfo/zope-announce
MF>  http://lists.zope.org/mailman/listinfo/zope-dev )