[Zope] full textsearch on own products !!

Geir B Hansen Geir B Hansen <geirh@funcom.com>
Wed, 29 Mar 2000 14:43:50 +0200


on Wednesday, March 29, 2000 Anders Holmbech Nielsen wrote :
AHN> Hi,

AHN> I seem to have a problem getting the full textindex to work on my own 
AHN> product. I have created a catalogaware Zclass qith som attributes. I 
AHN> want to make a full text search i all of these attributes. How do i 
AHN> do that ??

AHN> It works in the buildtin type like dtml document and dtml method but 
AHN> not in mine. Why is that ??

- Because PrincipiaSearchSource (which is probably what you
are using for your full text search) is a property(method?) of DTML document and
method, but not of your new product..

try making a pythonmethod or external method (pythonmethod
is simpler) inside your
Zclass containing something like :

   return string.join((self.yourAttribute1, self.yourAttribute2, self.yourAttribute3), '; ')


where yourAttributeX are the attributes of your Zclass..add
as many you like...

name it PrincipiaSearchSource if that's what you're using
for the full text search.. (might be 'raw' too...)

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