[Zope] ZClasses and ZCatalog: reindexing problem

Kevin Dangoor kid@kendermedia.com
Thu, 20 Apr 2000 10:35:35 -0400


----- Original Message -----
From: "Anthony Monta" <apmonta@excite.com>
To: <zope@zope.org>
Sent: Thursday, April 20, 2000 10:09 AM
Subject: [Zope] ZClasses and ZCatalog: reindexing problem


> I've been trying to create a simple, searchable database of scholarly
> publications for a university department with a customized ZClass,
ZCatalog,
> and the ZSearch interface but have run into two problems I cannot solve:
1)
> I can add a new catalog-aware class instance which the Catalog will pick
up,
> but the properties of this new instance (author, pub_title, publisher,
year,
> etc.) are not made available to search results; 2) the addition of this
new
> instance prevents the ZSearch interface from returning results for any
other
> query, even for ones that worked before the addition.

I don't know about #2 above, but I would make sure that your ZClass_add
method has:

<dtml-with "createInObjectManager stuff...."
  <dtml-call "propertysheets.YourPropSheet.manage_editProperties(REQUEST)">
  <dtml-call reindex_object>
</dtml-with>

For editing your CatalogAware ZClass instance properties, you will need to
create your own method to edit the properties and to post the changes... (To
post the changes, just take those two lines within <dtml-with> above, and
make a method out of it.)

HTH,

Kevin