Corrupt index

Beatrix Willius bwillius at gmx.de
Mon Jun 20 05:52:16 CDT 2011


Hi Ivan,

cleaning data means changing it. One example is straightening quotes with a simple regex:

  dim theRegex as new regex
  theRegex.options.ReplaceAllMatches = true
  theRegex.searchpattern = "«|»|“|”|‹|›|„"
  theRegex.replacementPattern = """"
  theString = theRegex.replace(theString)

TheString in this case is the field MessageBody. This is then written to the database

    theCleaner.setString theCursor.Field("MessageBody").GetString
    theCursor.Field("MessageBody").SetString theCleaner.execute
    theCursor.UpdateRecord

And somewhere here the index is corrupted.

On 20.06.2011, at 10:26, Ivan Smahin wrote:

> On 6/19/2011 6:42 PM, Beatrix Willius wrote:
>> Got it!
>> 
>> After adding date it's possible to clean it in my app.
> 
> Do you mean data - or there is some issue with date?
> "Clean data in the app" - what do you mean be that?
>> The loop goes over the main table messages and changes data.
> Is there just that index-by-word text field?
> Changes - do you mean update with something like NULL or empty string?
> 
>> This is actually quite simple and wasn't changed for a long time. Adding a flush after changing data didn't avert the problems.
> 
> Flush is about to write data to the disk - nothing more. So until your app is not crashed "in the middle" the "flush" cures nothing.
> 
>> Only a reindex did. I think this problem must be something newish to Valentina. A version of my app from march 2010 doesn't show the problem.
>> 
> 
> So originally the problem is - "Index corrupt after update" - yes?

Mit freundlichen Grüßen/Regards

Trixi Willius

http://www.mothsoftware.com
Mail Archiver X: archive, clean and search email
http://www.beatrixwillius.de
Fractals, 3d landscapes etc.



More information about the Valentina mailing list