Ubuntu – How to search a particular directory with tracker-search-tool

directoryfilessearchtracker

I have directories like ~Work ~School ~Movies.
Is it possible to search for files in only one of those directories with tracker-search-tool (or with tracker in general)?

Best Answer

I asked in IRC and it is not possible with tracker-search-tool but it is possible on the CLI:

The tracker search tool is pretty simple (and I am not very familiar with it) but at the least this can be done using command line tools (or custom queries in general). For instance, to find all the images under a specific directory (or actually the url of which starts with that specific directory) that Full-Text-Search match the string testi can be obtained with

tracker-sparql -q "SELECT ?uri nfo:fileName(?uri) WHERE {?uri a nfo:Image . ?uri fts:match 'testi' . ?uri nie:url ?url FILTER(fn:starts-with(?url, 'file:///home/masi/Pictures/Wallpapers')) }"