[Zope-dev] ZCTextIndex Improvements

Casey Duncan casey@zope.com
Thu, 5 Jun 2003 17:59:53 -0400


For the past few days I have been working on database conflicts stemming =
from=20
ZCTextIndex (no pun intended). The version currently released causes=20
conflicts for *any* concurrent index/unindex operation. I have changed bo=
th=20
the lexicon and index classes to fix this. Now conflicts coming from the=20
BTrees are the only ones you will get, and they are internally resolved i=
n=20
most cases.

Also, there was a bug in the query machinery that made it far more expens=
ive=20
for large indexes then it needs to be. This has also been fixed.

These improvements have now landed on the Zope head and 2.6 branch (soon =
to be=20
2.6.2 beta 3 I think). Any of you running Zope in production with any amo=
unt=20
of write concurrency should benefit. I ]encourage you to test the new=20
ZCTextIndex code with your applications (in a test environment of course)=
=2E=20
You should be able to simply replace the ZCTextIndex product in your zope=
=20
with the one in CVS (no reindex is necessary). I would certainly apprecia=
te=20
any feedback you might have on it.

Please note, that the code does make some minor data structure changes to=
 the=20
index and lexicon the first time they are updated. Therefore you cannot=20
simply remove the new product and go back to the old one by swapping the=20
code. You will need to rebuild your Lexicons and ZCTextIndexes to go back=
=2E=20
The hope though, is that you'll never want to ;^)

-Casey