RE: [Zope] Zcatalog and PrincipiaSearchSource with Zclasses ?
-----Original Message----- From: Geir B Hansen [mailto:geirh@funcom.com] Sent: Thursday, October 21, 1999 11:04 AM To: zope@zope.org Subject: [Zope] Zcatalog and PrincipiaSearchSource with Zclasses ?
From what i gather, the PrincipiaSearchSource variable let you do a full text search in DTML-documents and methods...
The Catalog can full text search on any property. PrincipiaSearchSource is just a 'stock' method. You can use any method you want.
It seems, though, that this doesn't work with Zclass-instances..
Sure it does.
Is there any way to do a full text search of Zclass instances ??
Yep.
for example i'd like to be able to search among my 'newsdoc' instances, not only by title, author or content, but with a single form-field.. Is this possible ??
Sure, why not just impliment a DTML Method in your ZClass called PrincipiaSearchSource that returns what you want indexed? <dtml-return "title + author + body"> -Michel
for example i'd like to be able to search among my 'newsdoc' instances, not only by title, author or content, but with a single form-field.. Is this possible ??
Sure, why not just impliment a DTML Method in your ZClass called PrincipiaSearchSource that returns what you want indexed?
<dtml-return "title + author + body">
-Michel
Wow.. I have been a bit narrow-minded when thinking about Zclasses and Zcatalog. A lot of things seem a lot clearer to me right now.. Thanks !! .. but.. i still cannot make the Zcatalog index my new method 'PrincipiaSearchSource' that i made inside my Zclass.. The method works nicely when called from another dtml-method, but does not get indexed.. I am at quite a loss here. . any hints to what i might do to solve it ?? ------------------------------------------------ Geir B Hansen geirh@funcom.com Web-designer / Graphic artist Funcom Oslo ------------------------------------------------
On Fri, 22 Oct 1999, Geir B Hansen 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">
Wow.. I have been a bit narrow-minded when thinking about Zclasses and Zcatalog. A lot of things seem a lot clearer to me right now.. Thanks !!
.. but.. i still cannot make the Zcatalog index my new method 'PrincipiaSearchSource' that i made inside my Zclass.. The method works nicely when called from another dtml-method, but does not get indexed.. I am at quite a loss here. .
any hints to what i might do to solve it ??
I don't think the example Michael gave will work. Try calling your DTML method from another dtml-method using the following syntax: <dtml-var "PrincipiaSearchSource()"> If this doesn't work, ZCatalog cannot index it. This is because ZCatalog does not (yet) call DTML methods with any arguments. It will quite happily index properties at the moment, so a work around is to store the output of your methods in a property and index that. Of course in some instances this is not a suitable workaround and you may need to look at alternatives to ZClasses. ___ // Zen (alias Stuart Bishop) Work: zen@cs.rmit.edu.au // E N Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen
participants (3)
-
Geir B Hansen -
Michel Pelletier -
Stuart 'Zen' Bishop