[Zope] programmatically adding an index.

David Convent david.convent at naturalsciences.be
Tue Feb 1 06:19:35 EST 2005


Joachim Schmitz wrote:

> hi,
>
> in my Product I trying to programmatically create an index. like so:
>
> myCatalog.addIndex('id', 'FieldIndex'), this works fine, but when I 
> try to specify the indexed-attribute like so:
>
> myCatalog.addIndex('name_sort','FieldIndex',
> extra={'indexed_attrs': 'name'})
>
> the new index does not include the indexed_attrs. This is because the 
> __init__ of Products/PluginIndexes/common/UnIndex.py
> expects for extra an instance of the HTTPRequest.py record-class.
> and does not support the mapping interface for extra. Is this a bug or 
> feature ?
>
see http://plone.org/documentation/howto/extend-portal-catalog-on-install

-- 
David Convent



More information about the Zope mailing list