Relevancy service doesn't seem to work

Asked by Nicolas Chachereau on 2011-01-17

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.


Question information

English Edit question
Synapse Edit question
No assignee Edit question
Solved by:
Nicolas Chachereau
Last query:
Last reply:
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. ;)

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/", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/share/zeitgeist/_zeitgeist/engine/", line 253, in FindEvents
    event_templates, storage_state, num_events, result_type, sender))
  File "/usr/share/zeitgeist/_zeitgeist/engine/", line 393, in find_events
    return self._find_events(1, *args)
  File "/usr/share/zeitgeist/_zeitgeist/engine/", line 376, in _find_events
    result = self._cursor.execute(sql, where.arguments).fetchall()
  File "/usr/share/zeitgeist/_zeitgeist/engine/", line 58, in execute
    return super(UnicodeCursor, self).execute(statement, parameters)
OperationalError: no such column: subj_uri_id

Some googling suggested it was related to bugs: and

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 :