Re: [Tracker] Enhancement proposal: Automatic reindexing when adding new extractors
- From: Michael Biebl <mbiebl gmail com>
- To: Adrien Bustany <madcat mymadcat com>
- Cc: Tracker list <tracker-list gnome org>
- Subject: Re: [Tracker] Enhancement proposal: Automatic reindexing when adding new extractors
- Date: Wed, 10 Feb 2010 10:17:13 +0100
2010/2/9 Adrien Bustany <madcat mymadcat com>:
Hi all,
this proposal is about automatically reindexing a mime type when a new
extractor is added/updated. There's already a "Reindex" call in
tracker-miner-fs.
Philip told me he'd like to keep tracker-extract as stupid as possible,
so the logic here would be implemented in tracker-miner-fs, at init time.
All extractors modules provide a function to know the mime types they can
index, but we want to avoid loading all the modules at start. Therefore,
a solution using desktop files is favoured. The desktop files would be
installed in ${datadir}/tracker/extractors and would have the format
[Extractor]
Name=Foobar extractor
MimeTypes=application/foobar
at startup, the FS miner loads all the description files and checks if a
new extractor has been added, removed, or changed its mtime. If
so, it calls the reindex method with the appropriate mime type.
To detect a change in a desktop file, a list of each desktop file with
their
modification time is kept in cache by the FS miner.
I think, in general the idea is good, I have some concerns though.
Using the mtime, might have some undesired side effects.
E.g. a user upgrades his tracker installation say from 0.7.18 to
0.7.19 (by either using make install or the distro package management
tools)
The mtime of the desktop files will change then. Do we really want to
reindex everything in that case? I don't think so.
Maybe, a more robust solution is to use hashsums for the desktop files
and a version counter.
[Extractor]
Name=Foobar extractor
MimeTypes=application/fooba
Version=1
Using a hashsum will ensure that we don't get spurious reindex
whenever the package is upgraded.
Consider now, that the author of the Foobar extractor has
significantly improved its extractor, and he want's to enforce a
reindex.
He'd then bump the Version counter and the hashsum would change.
Hope this makes sense. Thoughts?
Michael
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]