Re: [Zope-dev] ZCatalog reindex_object
Steve Alexander wrote: > reindex_object is a method of the mix-in class CatalogAwareness. Ah, that's okay then, since Squishdot doesn't have anything to do with CatalogAwareness. > I think calling index_object should work, as a well-implemented catalog > will do the right thing. However, calling reindex_object makes your > intentions more explicit. AFAICT, the catalog doesn't have a recatalog_object method and the comments for catalog_object in ZCatalog.py suggest it can be used to re-cataloging and well as cataloging. ...in which case, I wonder why CatalogAwareness goes to the trouble of unindexing and then re-indexing? answers on a postcard, or email ;-) cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog reindex_object
Chris Withers wrote: > Michael Bernstein wrote: > >> reindex_object - should be called when an object is edited > > > Hmmm... didn't see this method listed in the interfaces wiki. Where did > you find it? reindex_object is a method of the mix-in class CatalogAwareness. lib/python/Products/ZCatalog/CatalogAwareness.py line 191 def reindex_object(self): """ Suprisingly useful """ self.unindex_object() self.index_object() > I just inserted a call to catalog_object which did the job but I wonder > what the difference between index_object abd reindex_object and > catalog_object is? I think calling index_object should work, as a well-implemented catalog will do the right thing. However, calling reindex_object makes your intentions more explicit. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ZCatalog reindex_object
Michael Bernstein wrote: > > reindex_object - should be called when an object is edited Hmmm... didn't see this method listed in the interfaces wiki. Where did you find it? I just inserted a call to catalog_object which did the job but I wonder what the difference between index_object abd reindex_object and catalog_object is? cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )