[Zope-CMF] Re-cataloguing not happening?

seb bacon seb@jamkit.com
Tue, 5 Jun 2001 14:10:17 +0100


* Chris Withers <chrisw@nipltd.com> [010605 12:23]:
> Hi,
> 
> I'm aware I'm not using a particularly recent CVS checkout anymore, but I've
> noticed that if I edit the meta-data of a private document, it doesn't
> appear to be re-indexed.
> 
> Basically, I found the document's catalog record, and it didn't show the new
> information. After I hit the 'Update Catalog' button, it did.
> 
> Any help much appreciated...

This is off the top of my head, but it should be useful for
starters...

AFAIK the responsibility for reindexing an object sometimes falls on its
workflow.  Methods like Document.edit should be wrapped
WorkflowMethods (see WorkflowCore), which notify the object's
workflow(s) before and after the wrapped method is called.  The
relevant bit of the Workflow interface is notifyBefore, notifyFailure,
and notifySuccess.

However, most edit methods also call editMetadata, which is
in DublinCore.  This method is also a WorkflowMethod, and also
contains self.reindexObject().  So it *should* work.  

I wonder if it wouldn't be better to make reindexing the
responsibility of the Workflow, though?  You may not want to index an
object at all depending on its state.

hth

seb