[Zope-CMF] Why does GenericSetup remove indexes before adding them again?

Andreas Jung lists at zopyx.com
Thu Dec 13 15:30:45 EST 2007



--On 13. Dezember 2007 20:06:01 +0100 "Damien Baty (ML)" 
<damien at pilotsystems.net> wrote:

> 	Hello,
>
>    If I define a catalog index with GenericSetup, GS kindly removes the
> index of the same name if it exists, and then add it again. This is
> probably a good intention. However, when I reinstall a product (in this
> case, a Plone product), removing and adding back the index causes the
> indexed values to be lost. If the index definition has not changed, there
> is no real need to remove it and add it back.
>
>    I wonder what is the reason why GS remove all indexes, instead of
> comparing existing indexes with the ones listed in the import step, and
> adding new ones and removing and adding back only those that have changed.
>
>    (As an alternative, I could ask GS to reindex my index after having
> added it. However, it might not be such a good idea, though, because
> reindexing an index is expensive.)
>

Indexes can have individual configurations. So it might make sense for
some index types to remove and re-add them in order for having a clean
new configuration.

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-cmf/attachments/20071213/bd468843/attachment.bin


More information about the Zope-CMF mailing list