[Zope] ZCTextIndex question
Small Business Services
toolkit at magma.ca
Fri Jun 18 16:20:32 EDT 2004
I am trying to get to the contents of '_docwords' which is stored in
ZCTextIndex using an external method.
I have been trying to use the 'getEntryForObject' method of the ZCTextIndex
zclass, but have been unable to determine the proper python code (i'm a
python newbie) to gain access to this method in the proper context.
Ideally I would like to have a dtml method:
<dtml-in "Catalog({'id' : recid})">
ZCTextIndex words= <dtml-var "getwords(data_record_id_)">
</dtml-in>
and an external method (getwords):
from Products.ZCTextIndex.ZCTextIndex import ZCTextIndex
def getwords(self, rid):
return self.Catalog.ZCTextIndex.getEntryForObject(rid)
But this causes a zope runtime error (AttributeError: ZCTextIndex)
Any idea what I am doing wrong? Is there a better way to get at the
'_docwords' list in ZCTextIndex?
Thanks,
Jonathan
More information about the Zope
mailing list