[Zope-dev] [Fwd: ZCatalog.. Again.. I know..]
Chris Withers
chrisw@nipltd.com
Wed, 24 May 2000 16:24:03 +0100
Itamar Shtull-Trauring wrote:
> Last I heard, this bug fix did NOT fix the key-error problem. We are still
> getting lots of them (but it may have been fixed since in CVS. Michel?)
This is weird... the bit of code in question was:
lib/python/SearchIndex/Lexicon.py line 132:
else:
self._lexicon[intern(word)] = self.counter
self.counter = self.counter + 1
return self.counter
Now Michel's patch was to change this to:
else:
self.counter = self.counter + 1
self._lexicon[intern(word)] = self.counter
return self.counter
However, in the CVS I see it is now:
else:
if not hasattr(self, 'counter'):
self.counter = 0
self._lexicon[intern(word)] = self.counter
self.counter = self.counter + 1
return self.counter - 1
I'm not even going to try and guess which is right, all I know is that I
haven't made either change yet and I'm getting an unacceptable number of
incorrect search results in stock 2.1.6 and would like to sort it out...
Any ideas?
cheers,
Chris