[Zope-CMF] Re: reindexObject updates modification time?

Tres Seaver tseaver at palladion.com
Mon May 28 11:13:54 EDT 2007

Hash: SHA1

Darryl Dixon - Winterhouse Consulting wrote:

> The version of clearFindAndRebuild in CMFPlone 2.1.3 calls
> reindexObject(), but I see that in the HEAD (and presumably 2.5.x) it has
> been changed to simply indexObject(). Presumably this change is in direct
> response to the fact that reindexObject() touches the modification
> time...? Which lends even more weight to my original query - why on earth
> does reindexObject() update the modification time?  I can see utterly no
> reason why it should...

Originally, the catalog support provided a de facto "event mechanism",
along with its main job:  The 'reindexObject' method was designed to be
called from within "mutator" methodds / scripts, because the
'notifyModified' method is private.  Calling 'reindexObject' *implies*
that you have edited the object, else why would you be reindexing it?
The exception is if you pass through a set of indexes.

Note that calling either 'reindexObject' or 'indexObject' is unnecessary
in the context of a catalog rebuild:  you might as well just call
'catalog.indexObject(the_object)' directly.

If you *do* chose to go through the object, you can either just call
'indexObject' or pass the list of indexes you want to reindex explicitly.

We can't change this without going through a BBB / deprecation dance, in
order to allow people to fix code which depends on the current behavior.

- --
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the Zope-CMF mailing list