GNOME Bugzilla – Bug 768706
Reindexing files doesn't result in re-extraction
Last modified: 2016-07-13 15:45:44 UTC
You would expect that `tracker index ./file.mp3` would result in all metadata for ./file being added to the tracker-store. But it isn't so. If the file was already crawled, no new data will be inserted, even if the output of `tracker extract` is different to before. I hit this with files handled by the GStreamer extractor, where on a new Fedora installation, I had Tracker crawl all your files, but then realised I needed to install more codec packages. Now, `tracker index --file foo.mp3` and `tracker index --reindex-mime-type audio/mpeg` achieve nothing. I suspect this is due to the TrackerDecorator changes. The extractor is listening for GraphUpdated signals. If a file was already crawled by the miner-fs then there'll be no GraphUpdated signals. Perhaps `tracker index --file` and `tracker index --reindex-mime-types` should delete all as the first step? That introduces a risk of something crashing after the existing data is deleted but before the new data is added, though. A second possibly would be to synthesize a suitable GraphUpdated signal to trigger the extractor.
I had Tracker crawl all *my* files, not your files, don't worry :-)
Actually, although I definitely have a problem in my local Tracker installation, it seems to have a different cause. I've now added a testcase that proves that this functionality is working as it should: https://git.gnome.org/browse/tracker/commit/?id=e4493c677f721193c3e6416103731ef52f636490