[Zope-CMF] reindexObject problem

Yuppie schubbe@web.de
Wed, 05 Mar 2003 19:25:54 +0100


Hi!


Using TextIndexNG, reindexObject doesn't delete words from the index 
that are deleted from SearchableText.


First I thought this is a bug in TextIndexNG.

But than I found this in ZCatalog.CatalogAwareness:

     def reindex_object(self):
         self.unindex_object()      # calls uncatalog_object
         self.index_object()        # calls catalog_object

and this in CatalogTool.CatalogTool:

     def reindexObject(self, object, idxs=[]):
         url = self.__url(object)
         ## Zope 2.3 ZCatalog is supposed to work better if
         ## you don't uncatalog_object() when reindexing.
         # self.uncatalog_object(url)
         [...]
         self.catalog_object(object, url, idxs=idxs)


So now I think the reindex method is responsible for unindexing before 
reindexing. CMF doesn't support Zope 2.3 anyway, so maybe 
self.uncatalog_object(url) should be uncommented.
(Well, we can't do that if we reindex only some indxs.)


Any ideas?

TIA,

Yuppie