[Zope-CMF] Re: object indexing at creation

yuppie y.2004_ at wcm-solutions.de
Tue Jul 6 14:51:56 EDT 2004


Hi Florent!


Florent Guillaume wrote:
> I'm concerned about double reindexings that cost time.
> Why is there now a full ob.reindexObject() in _finishConstruction ?

I was not that concerned, so I did it for these reasons:

- addCreator() needs to be called
- after that Creator needs to be (re)indexed (and metadata updated)
- Zope 2.6.2 did not update metadata on selective reindexing

> There has already been an ob.indexObject() done at manage_afterAdd time, 
> and notifyWorkflowCreated calls the wf that reindexes its own variables. 
> Finally when we change the portal type, only a subset of the indexes 
> need to be changed (my old code).

It might make sense to revisit this after Zope 2.6.2 is no longer 
supported, but due to the Creator changes your old code isn't sufficient.

> If a scriptable type info does change the object, I feel it's its job to 
> call reindexObject.

That was just a side effect.


Cheers,
	Yuppie



More information about the Zope-CMF mailing list