Re: [Tracker] PATCH fixing error when deleting from fts table

Hey JÃrg,

Check attached new patch for new review.

I tested with both multi and single value properties. It seems to work.

On Tue, 2009-07-28 at 09:27 +0200, JÃrg Billeter wrote:
On Mon, 2009-07-27 at 21:23 +0200, Philip Van Hoof wrote:
tracker_db_statement_bind_text (stmt, 0, object);

I just realize that the object here is probably wrong. As the object
holds the rdf:type's value, and not the value of the original. As is the
case in the else block of the function.

Yes, object is wrong here.

I'll await your review to check if this is the right way to solve this
issue. We could for example first SELECT the value out of the fts table,
to feed it back during the UPDATE. Not sure ...

We need to retrieve the value from the decomposed table, the virtual fts
table only stores the full-text index, it does not store the content in

The remove_fts conditional inside the loop is wrong, we should always
remove all property values with the right domain. The string comparison
with "rdfs:Resource" is only relevant for deciding whether to delete the
whole row, not for the individual properties.

The DELETE statement for the fts table should be kept, it just needs to
be moved down after the property loop. The implementation in the
tracker-fts module needs to be fixed as well - that's what is really
responsible for the error messages in the log -, I'll take care of that.


Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org

Attachment: fts2.diff
Description: Text Data

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]