[Tracker] Enhancement proposal: Automatic reindexing when adding new extractors



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.

Ideas :
- Describe several extractors in one file
  That makes is much more difficult to detect a change, since only one
extractor
  in a file listing 10 might have changed when the file modification time
changes.
- Adding a version number in the desktop file, to avoid relying only on
the mtime
  of the desktop file.

Please tell me your thoughts

Adrien



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]