[Zope-CMF] Re: What is the status of GS wiping catalog indexes
on catalog.xml import?
Andreas Jung
lists at zopyx.com
Fri Feb 29 07:52:19 EST 2008
--On 28. Februar 2008 09:38:31 +0100 yuppie <y.2008 at wcm-solutions.de> wrote:
> Hi!
>
>
> Andreas Jung wrote:
>> How about the following idea:
>>
>> - within the Zope core we define an _optional_ interface for indexes -
>> something like:
>>
>> class IIndexConfiguration(Interface):
>>
>> def getConfiguration():
>> """ Returns a dict with index specific configuration
>> parameters.
>> """
>>
>> - on the CMF/GS side we could register adapter for each index type
>> we know (basically the Zope 2 core indexes, ExtendedPathIndex,
>> TextIndexNG 3) and retrieve the related information
>>
>> - the related GS asks each index for its configuration and takes
>> appropriate action based on the comparison of the values from the
>> profile and the existing index.
>>
>> Adding the interface to Zope 2.11 or backporting it to Zope 2.10
>> would not be a problem. Since the Zope 2.11 branch is offically closed
>> for new features, the index specific implementations of
>> IIndexConfiguration
>> should be implemented outside the Zope core but we might move the
>> implementation into the Zope core with Zope 2.12. Sounds reasonable?
>
> Yes. textindexng already has getSettings(), I used it for the
> export/import code of TextIndexNG3:
>
> http://textindexng.svn.sourceforge.net/viewvc/textindexng/TextIndexNG3/tr
> unk/exportimport.py?revision=1833&view=markup
>
> That code compares the settings and makes sure TextIndexNG3 is only
> modified and cleared if necessary. We could use similar code for all
> other indexes if they would provide a method like that.
>
> I'd prefer a IConfigurableIndex interface that also has a set method.
I added the IIndexConfiguration to the Zope trunk. I don't think that a set
method is a good idea. Removing and re-adding is possibly the cleanest
solution. Some indexes might perform some configurations within their
constructor. Calling clear() would not be enough for getting their
configuration right.
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-cmf/attachments/20080229/9502eb7a/attachment.bin
More information about the Zope-CMF
mailing list