[Zope] Clarifying ZCatalog-aware update conditions

Chris Fassnacht cfassnacht@ssc.wisc.edu
Mon, 20 Sep 1999 14:52:47 -0500


I'm currently trying to troubleshoot some problems with ZCatalog-aware
objects not automatically updating the catalog.  But before I go too much
further, I realized that I need to get a clearer idea of the terms and
conditions involved in the process.  Could ZCatalog gurus verify my
assumptions below?

All of the following assumes an object which inherits first from
_ZClass_for_CatalogAware.

If I understand correctly, the catalog will automatically reflect any
changes after the following processes:

- Adding an object.
- Deleting an object (but not if you delete the folder which contains the
object (but what if the object IS a folder?)).
- Changing the properties of an object (but if done with a custom property
sheet, must use the reindex_object command).

I'm confused about the reflected changes, however, because there seems to be
two distinct operations in the catalog that may or may not be part of the
automatic updating process:

- Indexing the object (locates the object(s) and gathers all the relevant
index information).
- Updating the catalog (adds the relevant index information to the catalog).


Okay.  What is actually happening in my application is that when I add one
of my ZClass objects (inherits from _ZClass_for_CatalogAware and
_ZClass_for_Folder, in that order), my catalog does NOT automatically
reflect the addition.  And clicking "Update Catalog" in the management
screen doesn't find it either.  However, if I manually tell it to scan
everything and find objects to catalog, it finds it just fine.
Now, if I then change an indexed property for that object, the change is NOT
automatically reflected in the catalog.  But if I click "Update Catalog,"
the change then appears.  And this occurs for properties for which I've
added a reindex_object command to its manage_editProperties method.
So, basically, it seems to me like I'm not getting what I would consider
automatic object indexing happening.  However, I am very open to input from
more knowlegdeable ZoPros on my understanding of ZCatalog.
Thanks.
Chris Fassnacht