23 Oct
1999
23 Oct
'99
5:44 a.m.
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.
PythonMethod is perfect for this kind of thing. I just created PrincipiaSearchSource with self as an argument and the following code: return self.id+"; "+self.title+"; "+self.text ... and then re-indexed everything (so the catalog picked up on the method) and performed a search. Worked a treat! return string.join((self.id, self.title, self.text,), '; ') would perhaps be more efficient, but isn't quite as readable. :) Regards, Garth. -- <gtk@well.com>