[Zope] Re: Warning: TextIndexNG 1.07 corrups your objects if you have casefolding on

Andreas Jung andreas@andreas-jung.com
Mon, 06 Jan 2003 05:40:29 +0100


I have never seen this problem since casefolding is on by default(!) and 
there is
no code that modifies the original object. Please provide a reasonable 
description
how to reproduce this problem with a standard Zope installation.

-aj

--On Montag, 6. Januar 2003 04:59 +0200 Heimo Laukkanen 
<huima@fountainpark.org> wrote:

> Hi ya,
>
> this is a very strange bug that I my collegue found, I hunted down that
> TextIndexNG is the cause for it.
>
> Short description:
> When TextIndexNG is used and case folding is on, TextIndexNG seems to
> corrupt the object - ie. putting the case folded content to the object
> that it indexed!
>
> Below is my story.
>
> Situation:
>
> Site with propertyObjects, propertyFolders and ZCatalog that has
> TextIndexNG fields. Some propertyObjects / folders have a field called
> content, which is uText of type and is indexed into TextIndexNG.
>
> If in TextIndexNG we have case folding turned on, then after we save
> changes to propertyObject/Folder ( and object indexes itself automaticly
> to Catalog ) the content in content-field loses it's case. And if we turn
> off the case folding, then casing stays. In TextIndexNG it does not
> matter, wether the id for index is content or something else - as long as
> content-attribute is indexed.
>
> I didn't look into TextIndexNG code, but I assume that somewhere there is
> a bug that takes the object attribute instead of just the value of it,
> and thisway also screws up the object. This was really evil bug, since it
> was hard to get - and when we saw it - then it had allready corrupted a
> lot of files that had content.
>
> -huima




    ---------------------------------------------------------------------
   -    Andreas Jung                     http://www.andreas-jung.com   -
  -   EMail: andreas at andreas-jung.com                              -
   -            "Life is too short to (re)write parsers"               -
    ---------------------------------------------------------------------