Hi,
Cornelius Hald wrote: I think you need to add your module name "TomboyNotes" in tracker_service_types which is defined in src/libtracker/tracker.c.Hello again, I spend some time today trying to get my code running. Unfortunately without success yet. I hope someone here can help me, because I just ran out of ideas :( Here is what I did so far: * I wrote a indexer module with the filename tomboy-notes.c which compiles into libtracker-module-tomboy-notes.so. It's mainly boiler plate code with very simple *_get_text() and *_get_metadata() implementations. * The file tomboy-notes.c is in my own project, not in the tracker source tree. So to make it compile I had to copy the tracker-module-*.h headers to my project. Not sure if that matters. Everything seems to compile fine. * Wrote a module file (code is below) and put it here: /usr/share/tracker/modules/tomboy-notes.module * Created a metadata file (code is below) here: /usr/share/tracker/services/note.metadata * Added the following to: /usr/share/tracker/services/default.service [TomboyNotes] DisplayName=Tomboy Notes Description=Tomboy Notes Parent=Files UIVisible=true Icon=x-office-document ShowServiceFiles=true HasMetadata=true HasFullText=true HasThumbs=false When I'm running "tracker-services -s" I get: [...] TomboyNotes [...] That looks good to me :) When I'm running "tracker-services -p" I get: [...] Note:ChangeDate Note:CreateDate Note:Tags Note:Text Note:Title [...] Which looks also good. But if I'm running "tracker-search -s TomboyNotes Hello" I get: Service not recognized, searching in other files... Which doesn't look that good to me. Because the main function of tracker-search which resides in src/tracker-utils/tracker-search.c calls tracker_service_name_to_type which is also defined in src/libtracker/tracker.c, to check the service name users entered. tracker_service_name_to_type will compare every service name in tracker_service_types with that user entered.But now your service name is not included in that array. So, the result "Service not recognized, searching in other files... ". Hope that will help you. :-) Regards, Lacey Next thing is the log files: tracker-indexer.log always only shows the following two lines: 16 Jun 2009, 21:00:40: Tracker-Critical **: Could not initialize the HAL context, no error, is hald running? 16 Jun 2009, 21:00:40: GVFS-RemoteVolumeMonitor-Warning **: remote volume monitor with dbus name org.gtk.Private.HalVolumeMonitor is not supported The trackerd.log shows lots of things. Some of the more remarkable things are: [...] 16 Jun 2009, 21:00:39: Tracker: Loading ontology service:'TomboyNotes' with id:19 and mimes:0 [...] 16 Jun 2009, 21:00:51: Tracker: Processing module:'tomboy-notes' [...] 16 Jun 2009, 21:00:51: Tracker: Crawling directories for module:'tomboy-notes' 16 Jun 2009, 21:00:51: Tracker: Using module paths 16 Jun 2009, 21:00:51: Tracker: Directory:'/home/conny/.conboy' added to list to crawl exists 16 Jun 2009, 21:00:51: Tracker: Directory:'/home/conny/.tomboy' does not exist 16 Jun 2009, 21:00:51: Tracker: Searching directory:'/home/conny/.conboy' 16 Jun 2009, 21:00:51: Tracker: Found :'/home/conny/.conboy' (0) 16 Jun 2009, 21:00:51: Tracker: Added monitor for module:'tomboy-notes', path:'/home/conny/.conboy', total monitors:1 16 Jun 2009, 21:00:51: Tracker: Found :'/home/conny/.conboy/7e941c07-20dc-44ee-9e16-d7622a1cf93d.note' (1) 16 Jun 2009, 21:00:51: Tracker: Found :'/home/conny/.conboy/deffb5b8-4124-425e-8148-a28779426511.note' (1) [...] 16 Jun 2009, 21:00:58: Tracker: Queue for module:'tomboy-notes' created items processed, sending first 20 to the indexer [...] Well, I know this is a lot of information at once, but I hope you can somehow help me. To me it looks like the actual tomboy-indexer library is never loaded. Somehow I suspect that I named something wrong and that is not found because of that. Well, than again I'm really new to tracker and it could be everything. Maybe I didn't understand something fundamental at all? So here would be my actual questions, after all this noise :) * Why is my indexer not called? * What is ScanTimeout and CacheTimeout and it which unit is it measured? * Is it possible to add a new *.service file instead of extending the default.service file? The complete source code can be found here if needed: https://garage.maemo.org/plugins/scmsvn/viewcvs.php/trunk/conboy/src/tracker/?root=conboy Thank you very much :) Conny --------------- tomboy-notes.module ------------------- [General] Description=Tomboy Notes Enabled=true [Monitors] Directories=$HOME/.conboy;$HOME/.tomboy; RecurseDirectories= [Ignored] Directories= Files= DirectoriesWithContent= [Index] Service=TomboyNotes MimeTypes= Files=*.note ScanTimeout=6000 CacheTimeout=120 ------------------------------------------------- --------------- note.metadata ------------------- [Note:Title] DisplayName=Title Description=Note title DataType=index Parent=DC:Title Weight=20 Filtered=false [Note:Text] DisplayName=Text Description=Note text DataType=fulltext Weight=5 [Note:Tags] DisplayName=Tags Description=Tags attached to the note DataType=keyword Parent=DC:Keywords Weight=20 Filtered=false Delimited=true [Note:CreateDate] DisplayName=Create date Description=The date the note was created DataType=date Parent=DC:Date [Note:ChangeDate] DisplayName=Change date Description=The date the note was last changed DateType=date Parent=DC:Date -------------------------------------------------- _______________________________________________ tracker-list mailing list tracker-list gnome org http://mail.gnome.org/mailman/listinfo/tracker-list |