[Zope-dev] ZCatalog becoming empty when using "Update" in conjunction with ZPatterns

Jean Jordaan jean@upfrontsystems.co.za
Mon, 3 Dec 2001 11:58:47 +0200


Hi all

I had a ZCatalog with about 3500 DataSkin instances indexed. Then 
I started to index instances of a regular ZClass as well. Then I 
added another index, to catalog an additional property of this 
ZClass, and hit "Update Catalog".

When Zope returned from updating, there were no records in the 
Catalog, though the Vocabulary was intact. I see that I cannot
search for the DataSkin metatypes using the "Find Objects"
ZCatalog tab: they don't show up in the "Find objects of type"
field. So perhaps this is why updating failed.

However, now the Catalog is not accepting any entries. I originally
did the cataloging using this kind of loop on all the classes I 
wanted indexed::

  ids = container.Roundup.Issues.defaultRack.getPersistentItemIDs()
  for id in ids:
      object = container.Roundup.Issues.defaultRack.getItem(id)
      Catalog.catalog_object( object
                            , string.join( object.getPhysicalPath()
                                         , '/'))

When I try to run that again, I still get "There are no objects in 
the Catalog." upon return. When I run it using a newly created catalog 
('testCatalog') instead, it works fine.

Could anyone perhaps explain what's happening here? 

Regards,
Jean