[Zope-CMF] reindexObject problem
Yuppie
schubbe@web.de
Thu, 06 Mar 2003 19:13:28 +0100
Hi!
Tres Seaver wrote:
> This is a bug in the index.
Ok. So I have to find out if this is fixed in the latest release of
TextIndexNG or report a bug.
>>But than I found this in ZCatalog.CatalogAwareness:
>>
>> def reindex_object(self):
>> self.unindex_object() # calls uncatalog_object
>> self.index_object() # calls catalog_object
>>
[...]
> That is a fossil, and likely a *huge* performance drag if it is actually
> being called. Reindexing should *not* unindex first; the only time
> an object should be unindexed is when its UID (the physical path in most
> cases) is no longer valid (i.e., it has moved or been deleted).
>
> The tool is doing the Right Thing (TM) by not uncataloguing first. Can
> you determine whether CatalogAwareness.reindex_object is ever actually
> called? We should probably just remove it, in any case.
Here my grep results:
1.) The only place reindex_object is used inside Zope is
HelpTopic.HelpTopicBase . (In fact HelpTopicBase has its own
reindex_object method doing the same.)
2.) ZNuxDocument and LocalContent (part of Localizer) call it.
Cheers,
Yuppie