Zope catalogs contain catalog objects with index attributes (for use as query arguments) and metadata attributes (available when accessing the search result). For index attributes, there is the possibility of reindexing for cases when the calculation logic of the index has changed.
I noticed that my getThumbnailPath
metadata field was incorrect for one of my Archetypes-based content types. Of course, the metadata field contents don't change automatically when the method has changed; thus, I'd like to fix this in an upgrade step.
However, there seems to be no documented way to do this for metadata fields; the catalog reindexing documentation doesn't say much about this.
What would be the state-of-the-art way to do this?
- I there a way to refresh a certain metadata field?
- Do I need to do a catalog search for the affected type and reindex every single item (recalculating every other index and metadata field as well)?
- Should I create an index of the same name, and should I remove that index afterwards, or won't it matter anyway?
Update: For now, I chose the 2nd possibility, but it took ~ 100 seconds for the 1069 objects of that type, and it could easily take hours with all other objects affected as well; it would be nice to have a more selective way.