Relevancy service doesn't seem to work

Asked by Nicolas Chachereau

The relevancy engine doesn't seem to be working, e.g. Synapse doesn't "learn".

Since the blog [1] indicates this has been fixed, I post it here, assuming it is a mistake on my side. So I'd like to get some support. If it turns out this is not the case, I'll be happy to report it as a bug.

Specific example: Even though I launch "Navigateur Web Firefox" (yes, my system is in French) a lot, and always type "fir" in Synapse to launch it, if I type F, "Fenêtre de connexion" is still the first result, even though I never launched it with Synapse.
Same example with, say, "Dossier personnel" (Home Folder) which doesn't show up as the first result when I only type D ("Date et heure" shows up).

Maybe I'm missing some Zeitgeist packages? Or should I remove something? I'm running Ubuntu 10.10. I build Synapse from trunk. Below is the list of the installed packages related to Zeitgeist. From what I see, some of them from the Synapse PPA, others from the Zeitgeist PPA, others from Maverick default repositories.

Thank you for your help.

nico@nico-laptop:~$ aptitude search zeitgeist | grep ^i
i A libzeitgeist-1.0-0 - library to access Zeitgeist - shared libra
i libzeitgeist-dev - library to access Zeitgeist - development
i A libzeitgeist0.1-cil - CLI bindings for Zeitgeist Project
i zeitgeist - event logging framework
i zeitgeist-core - event logging framework - engine
i A zeitgeist-datahub - event logging framework - passive logging
i zeitgeist-datasource-bzr - Zeitgeist data-source for Bazaar
i zeitgeist-datasource-rhythmbox - Zeitgeist Dataprovider for Rhythmbox
i zeitgeist-datasource-tomboy - Zeitgeist Dataprovider for Tomboy
i zeitgeist-datasource-totem - Zeitgeist Dataprovider for Totem
i zeitgeist-fts-extension - Extensions for zeitgeist engine - fts exte

I can provide specific version information for each package, if needed.

[1] http://mhr3.blogspot.com/2010/12/more-synapse-news.html

Question information

Language:
English Edit question
Status:
Solved
For:
Synapse Edit question
Assignee:
No assignee Edit question
Solved by:
Nicolas Chachereau
Solved:
Last query:
Last reply:
Revision history for this message
Michal Hruby (mhr3) said :
#1

Could you paste the terminal output? What's your Synapse version? You mention installing from trunk, yet you also mention Synapse PPA, so how did you install exactly? You might be better off using the PPA - we built it and therefore we know it works. ;)

Revision history for this message
Nicolas Chachereau (nicolas-chachereau) said :
#2

Ok, I was able to fix my problem. If anyone ever encounters a similar problem, this works.

* uninstall all Zeitgeist-related packages
* delete ~/.local/share/zeitgeist
* reinstall Synapse and other Zeitgeist stuff.

You probably don't even need to uninstall everything, just stop the zeitgeist daemon (zeitgeist-daemon --quit), delete the folder and restart the daemon. I haven't tried though, so I'm not sure.

Technical details
---------------------
I think I tried Zeitgeist at some point in the past, or something like that. Apparently I already had a Zeitgeist database, but it didn't work with the new one.

I discoved what the root of the problem In the terminal output:

** (synapse:15874): WARNING **: relevancy-backend-zg.vala:98: Remote Exception invoking org.gnome.zeitgeist.Log.FindEvents() on /org/gnome/zeitgeist/log/activity at name org.gnome.zeitgeist.Engine: org.freedesktop.DBus.Python.sqlite3.OperationalError: Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/dbus/service.py", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/share/zeitgeist/_zeitgeist/engine/remote.py", line 253, in FindEvents
    event_templates, storage_state, num_events, result_type, sender))
  File "/usr/share/zeitgeist/_zeitgeist/engine/main.py", line 393, in find_events
    return self._find_events(1, *args)
  File "/usr/share/zeitgeist/_zeitgeist/engine/main.py", line 376, in _find_events
    result = self._cursor.execute(sql, where.arguments).fetchall()
  File "/usr/share/zeitgeist/_zeitgeist/engine/sql.py", line 58, in execute
    return super(UnicodeCursor, self).execute(statement, parameters)
OperationalError: no such column: subj_uri_id
 org.freedesktop.DBus.Python.sqlite3.OperationalError Traceback%20%28most%20recent%20call%20last%29%3A%0A%20%20File%20%22%2Fusr%2Flib%2Fpymodules%2Fpython2.6%2Fdbus%2Fservice.py%22%2C%20line%20702%2C%20in%20_message_cb%0A%20%20%20%20retval%20%3D%20candidate_method%28self%2C%20%2Aargs%2C%20%2A%2Akeywords%29%0A%20%20File%20%22%2Fusr%2Fshare%2Fzeitgeist%2F_zeitgeist%2Fengine%2Fremote.py%22%2C%20line%20253%2C%20in%20FindEvents%0A%20%20%20%20event_templates%2C%20storage_state%2C%20num_events%2C%20result_type%2C%20sender%29%29%0A%20%20File%20%22%2Fusr%2Fshare%2Fzeitgeist%2F_zeitgeist%2Fengine%2Fmain.py%22%2C%20line%20393%2C%20in%20find_events%0A%20%20%20%20return%20self._find_events%281%2C%20%2Aargs%29%0A%20%20File%20%22%2Fusr%2Fshare%2Fzeitgeist%2F_zeitgeist%2Fengine%2Fmain.py%22%2C%20line%20376%2C%20in%20_find_events%0A%20%20%20%20result%20%3D%20self._cursor.execute%28sql%2C%20where.arguments%29.fetchall%28%29%0A%20%20File%20%22%2Fusr%2Fshare%2Fzeitgeist%2F_zeitgeist%2Fengine%2Fsql.py%22%2C%20line%2058%2C%20in%20execute%0A%20%20%20%20return%20super%28UnicodeCursor%2C%20self%29.execute%28statement%2C%20parameters%29%0AOperationalError%3A%20no%20such%20column%3A%20subj_uri_id%0A

Some googling suggested it was related to bugs: https://bugs.launchpad.net/zeitgeist/+bug/642803 and https://bugs.launchpad.net/zeitgeist/+bug/642772.

So I deleted my database and was able to make everything work again. Arguably Zeitgeist should be able to transform its database if needed. Luckily there's already a bug for that : https://bugs.launchpad.net/ubuntu/+source/zeitgeist/+bug/660307