11

I'm using the tracker indexing tool to search for and in files on my Ubuntu 10.10 amd64 system. Having recently added some of files into a single folder I wondered how to force tracker to re-index this folder so I would be able to perform search-queries on these files.

Any ideas? A terminal command would be completely sufficient.

ubuntudroid
  • 490
  • 2
  • 15

4 Answers4

5

This command will make Tracker reindex all its folders:

tracker-processes -r

Not exactly what you want, but has helped me quite a few times.

Shnatsel
  • 1,188
  • 1
  • 13
  • 23
4

With recent releases of tracker (mine is 1.12.0), you can force the re-indexing of a given folder simply typing:

tracker reset -f DIR_NAME

This causes the indexed information for DIR_NAME to be deleted and indexed again. Ir could be a directory or a file.

methadata
  • 201
  • 1
  • 6
  • Tried it, now tracker just fails to start, from the journal: `Failed to start Tracker metadata database store and lookup manager.`. I guess it will be fine after a reboot... – elboulangero Feb 12 '19 at 02:51
3

tracker should watch the directory and automatically index any added files - so make sure watching is enabled in the preferences. but generally, my experience with tracker has been that it works inconsistently at best.

  • I know, that tracker has this auto-index feature, but there are situations, when you know, that some files have seen changes or were added and you know, that you'll use them a lot in the next few hours - so it would be good to have them at your fingertips instantly by manually forcing tracker to index these files/folders. – ubuntudroid Jun 22 '10 at 11:57
  • 2
    it's a shame people want manual access to force tracker to do something that it should be doing, but isn't. – Jeremiah Rose Jul 01 '10 at 03:59
2

It seems as if @methadata's answer should be correct, but for me, tracker was still not indexing the directory; I also tried tracker index -f DIR_NAME. The only thing that worked for me was to get tracker to completely wipe the index and start indexing again from scratch:

tracker reset -r     # shut down indexing and erase index
tracker daemon -s    # start indexing again

Source: tracker docs