[ZCM] [ZC] 828/ 1 Request "Fix KeywordIndex when faced with duplicate keywords"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin@zope.org
Fri, 28 Feb 2003 04:02:39 -0500


Issue #828 Update (Request) "Fix KeywordIndex when faced with duplicate keywords"
 Status Pending, Zope/bug+solution medium
To followup, visit:
  http://collector.zope.org/Zope/828

==============================================================
= 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

==============================================================