[Zope] how to unindex an non existing (deleted)object

robert rottermann robert at redcor.ch
Tue Jun 24 05:32:53 EDT 2008


Martijn Jacobs schrieb:
> robert rottermann wrote:
>> Hi there,
>>
>> Sometimes a catalog query returns brains that point to non existing 
>> objects.
>>
>> how can I remove such brains from the index programmatically  without 
>> using the portal_catalag/advanced/update tab?
>>
>> thanks
>> robert
> If you want to call the update catalog functionality yourself : A 
> Zcatalog has a method refreshCatalog which you can use (take a look at 
> ZCatalog.py).
> 
> If you want to remove the brain you could call the 
> _catalog.uncatalogObject method.However, when you have brains which 
> point to non-existent objects you should reindex the catalog, as 
> something went wrong while (un)indexing these objects.
> 
> 
> Martijn.
> 

thanks very much.
robert


More information about the Zope mailing list