[ZCM] [ZC] 828/ 3 Accept "Fix KeywordIndex when faced with duplicate keywords"
Collector: Zope Bugs, Features, and Patches ...
zope-coders-admin@zope.org
Fri, 28 Feb 2003 09:50:55 -0500
Issue #828 Update (Accept) "Fix KeywordIndex when faced with duplicate keywords"
Status Accepted, Zope/bug+solution medium
To followup, visit:
http://collector.zope.org/Zope/828
==============================================================
= Accept - Entry #3 by Caseman on Feb 28, 2003 9:50 am
Status: Pending => Accepted
Supporters added: Caseman
________________________________________
= Comment - Entry #2 by neaj on Feb 28, 2003 4:07 am
Uploaded: "KeywordIndex.py.patch-261"
- http://collector.zope.org/Zope/828/KeywordIndex.py.patch-261/view
I tried to add the 2nd patch via the "Folder contents" view ..
my word, what an obscure frustration ..
________________________________________
= Request - Entry #1 by neaj on Feb 28, 2003 4:02 am
Uploaded: "KeywordIndex.py.patch-251"
- http://collector.zope.org/Zope/828/KeywordIndex.py.patch-251/view
Dieter Maurer says it best:
In order to unindex objects later, Zope's indexes remember
the values an object has been indexed by.
"KeywordIndex" is a bit stupid about this.
If the sequence contains duplicates, it does not remove
them.
Later, when the object is unindexed, it tries to remove
the object from the list for each term in the sequence.
In case of a duplicate, this goes well when it is
encountered for the first time but, when it is encountered
again, the object can (of course) not be removed...
Our fix makes sure that duplicates don't get into
the list in the first place.
We're including 2 patches for 2 versions of Zope:
KeywordIndex.py.patch-251
KeywordIndex.py.patch-261
==============================================================