Ever since the unicode bug in Virtuoso 6.1.3 many of us have broken unicode strings in our Nepomuk databases. Completely re-creating the database is IMHO not an option since that would mean loosing all manual annotations and things like download source URLs. One solution would be restoring a backup but I simply do not trust the Nepomuk backup until I had a deeper look into it. The perfect solution would be if Nepomuk could simply fix the data automatically. While that is of course my goal and I am looking into that it will take a while.
In the meantime I threw together a small desktop file which adds two new actions to the context menu of folders.
- (Re-)index Folder contents will make the indexer update all the files in the folder indifferent of their state in Nepomuk. This includes fixed unicode strings.
- (Re-)index Folder contents recursive does the same as the above except that it also recurses into sub folders.
Simply put the following into a file called “nepomuk-index-folder.desktop” and save it in “~/.kde/share/kde4/services/ServiceMenus”. At the next start of Dolphin or Konqueror the two new actions will be available.
[Desktop Entry] Type=Service X-KDE-ServiceTypes=KonqPopupMenu/Plugin,inode/directory Actions=indexFolder;indexFolderRecursive; X-KDE-Submenu=Desktop Search Icon=nepomuk [Desktop Action indexFolder] Name=(Re-)index Folder contents Icon=nepomuk Exec=qdbus org.kde.nepomuk.services.nepomukfileindexer /nepomukfileindexer org.kde.nepomuk.FileIndexer.indexFolder %f 0 1 [Desktop Action indexFolderRecursive] Name=(Re-)index Folder contents recursive Icon=nepomuk Exec=qdbus org.kde.nepomuk.services.nepomukfileindexer /nepomukfileindexer org.kde.nepomuk.FileIndexer.indexFolder %f 1 1
Update: The code above does only work for KDE 4.8 since we renamed the “strigi service” to “file indexing service”. So in order to make this work in KDE 4.7 and before replace “nepomukfileindexer” with “nepomukstrigiservice” and “FileIndexer” with “Strigi”.
What about e-mail? Is there a way to force re-indexing?
Good point. I will have to investigate.
That’s interesting! However, on my system (OpenSUSE 12.1 with KDE 4.7.3) this does not work.
When I run
qdbus org.kde.nepomuk.services.nepomukfileindexer /nepomukfileindexer org.kde.nepomuk.FileIndexer.indexFolder FolderToIndex 0 1
on the command line, I get the error message:
Cannot find ‘org.kde.nepomuk.FileIndexer.indexFolder’ in object /nepomukfileindexer at org.kde.nepomuk.services.nepomukfileindexer
Any thoughts?
Yeah, I forgot to mention that this is for KDE 4.8. Will update blog…
I’m seeing the same error as Stefan with KDE 4.8 installed. My database was originally on earlier versions though. Any ideas?
Backup/restore is not working at all in KDE 4.7.3.
Just in time! :) Thanks for the hint!
If nepomuk backup is not trusted by its developer, should it be there at all?
I don’t want to flame or anything, but I think it’s better to have no option than to have one that seems to work, but when you need it, it doesn’t.
Sure. I am not its developer though. I will, however, do some proper testing and try to fix it.
To clarify, then, did you mean that you have reason to distrust its reliability, or merely that you wanted to have a better look at it before recommending its use in this circumstance?
To be honest I never really tested it myself. And I am reluctant to recommend solutions that I did not test – especially since there were reports about problems with the backup service.
It would make sense to disable the backup interface until it’s better tested.
Nice tip! There should be a simple command to reindex all indexed folders – is it a smart idea to run
to achieve that?
Yes, this is correct indeed. There are “indexFolder” and “updateFolder”. The difference is that the latter does take the configuration into account and only updates what it configured to be updated.
Please, force some reindexings. I’ve found trouble migrating Nepomuk databases from KDE 4.7 to KDE 4.8. Deleting my old database and creating a new one generated a performant and light database with almost no impact in resource usage.
What do you mean when you say “trouble”?
Pingback: detailed KDE Nepomuk Manual « kdenepomukmanual
Hello Sebastian,
really a big thank for this introduced solution of one of my problems. I really appreciate the work that you KDE-folks are doing. But the question of A Rojas is still unanswered. How to force a re-indexing of e-mails?
And to get some more knowledge: where and in what form are the filters stored that I setup in system settings – desktop search? I mean the folders that shall be included and the MIME types and files to exclude from indexing. (My guess: they are stored in a MySQL table?) Are this filters considered in a forced re-indexing?
Cheers
Aldicek