[ZCM] [ZC] 1688/ 3 Assign "support mapping interface for extra in
addIndex"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Tue Feb 1 09:35:37 EST 2005
Issue #1688 Update (Assign) "support mapping interface for extra in addIndex"
Status Accepted, Zope/feature medium
To followup, visit:
http://collector.zope.org/Zope/1688
==============================================================
= Assign - Entry #3 by ajung on Feb 1, 2005 9:35 am
Supporters added: ajung; removed: tino
Taking over this issue as part of my work on indexes for Zope 2.8
________________________________________
= Assign - Entry #2 by tino on Feb 1, 2005 9:28 am
Status: Pending => Accepted
Supporters added: tino
I'll refine the patch and put this in
________________________________________
= Request - Entry #1 by Anonymous User on Feb 1, 2005 7:55 am
the __init__ in Products/PluginIndexes/common/UnIndex.py should support a dictionary for the extra parameter.
here is a possible patch, which work for me:
# allow index to index multiple attributes
if type(extra) is type({}):
self.indexed_attrs = extra.get('indexed_attrs','').split(',')
self.indexed_attrs = [ attr.strip() for attr in self.indexed_attrs if attr ]
if len(self.indexed_attrs) == 0: self.indexed_attrs = [ self.id ]
else:
try:
self.indexed_attrs = extra.indexed_attrs.split(',')
self.indexed_attrs = [ attr.strip() for attr in self.indexed_attrs if attr ]
if len(self.indexed_attrs) == 0: self.indexed_attrs = [ self.id ]
except:
self.indexed_attrs = [ self.id ]
==============================================================
More information about the Zope-Collector-Monitor
mailing list