[Zope] Zcatalog and PrincipiaSearchSource with Zclasses ?

Martijn Pieters mj@antraciet.nl
Fri, 22 Oct 1999 12:23:43 +0200


At 17:43 21/10/99 , Michel Pelletier wrote:
>Sure, why not just impliment a DTML Method in your ZClass called
>PrincipiaSearchSource that returns what you want indexed?
>
><dtml-return "title + author + body">

This won't work, because you can't index on the result of a DTML Method. 
The DTML Method doesn't get called with the usual client and REQUEST 
objects, so the method has no means of obtaining the title, author and body 
parameters.

You can do it with an External Method:

   def AllField(self)
       return self.title + self.author + self.body

or you could make a property on you object that on every update gets filled 
with the contents of title + author + body.

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------