Thank you for the the replies. In this example it wasn’t a git repo, although I have tried searching within git repos in the past and been frustrated by the lack of results, so that is useful to know.
The test example I gave here was a subfolder (several levels deep) from the Home directory, which was set to be indexed, so should have been an indexed location. However trying it this morning it works, both the command line localsearch search stringtofind finds it and using the file manager search box. I swear this didn’t work yesterday! But now it seems to be working for a .txt file whatever I do (I’ve tried creating more files in subfolders with different content and they all get found)
However, yesterday wasn’t the first time I had been frustrated by a lack of search results, mostly when searching for lines of code, so I then experimented renaming with different extensions, I tried test.py and test.cpp and these both failed to be found (either command line or gui). Switching it back to test.txt allowed it to be found.
So now the question is, how to I set it to include these extensions in the search (preferably just to ignore the extension and include any text file as I also want yaml, json, sh and probably a few others that don’t come to mind). Also to stop it from ignoring the contents of folders just because they’re git repos.
Running: gsettings list-recursively org.freedesktop.Tracker3.Miner.Files
returns:
org.freedesktop.Tracker3.Miner.Files crawling-interval -1
org.freedesktop.Tracker3.Miner.Files enable-monitors true
org.freedesktop.Tracker3.Miner.Files ignored-directories [‘po’, ‘CVS’, ‘core-dumps’, ‘lost+found’]
org.freedesktop.Tracker3.Miner.Files ignored-directories-with-content [‘.trackerignore’, ‘.git’, ‘.hg’, ‘.nomedia’]
org.freedesktop.Tracker3.Miner.Files ignored-files [‘~', '.o’, ‘.la’, '.lo’, ‘.loT’, '.in’, ‘.m4’, '.rej’, ‘.gmo’, '.orig’, ‘.pc’, '.omf’, ‘.aux’, '.tmp’, ‘.vmdk’, '.vm*’, ‘.nvram’, '.part’, ‘.rcore’, '.lzo’, ‘autom4te’, ‘conftest’, ‘confstat’, ‘Makefile’, ‘SCCS’, ‘ltmain.sh’, ‘libtool’, ‘config.status’, ‘confdefs.h’, ‘configure’, ‘##', '~$.doc?’, ‘~$.dot?', '~$.xls?’, ‘~$.xlt?', '~$.xlam’, ‘~$.ppt?', '~$.pot?’, ‘~$.ppam’, '~$.ppsm’, ‘~$.ppsx’, '~$.vsd?’, ‘~$.vss?', '~$.vst?’, ‘*.directory’]
org.freedesktop.Tracker3.Miner.Files index-on-battery true
org.freedesktop.Tracker3.Miner.Files index-on-battery-first-time true
org.freedesktop.Tracker3.Miner.Files index-optical-discs false
org.freedesktop.Tracker3.Miner.Files index-recursive-directories [‘$HOME’]
org.freedesktop.Tracker3.Miner.Files index-removable-devices false
org.freedesktop.Tracker3.Miner.Files index-single-directories @as
org.freedesktop.Tracker3.Miner.Files initial-sleep 15
org.freedesktop.Tracker3.Miner.Files low-disk-space-limit -1
org.freedesktop.Tracker3.Miner.Files removable-days-threshold 3
org.freedesktop.Tracker3.Miner.Files throttle 0
I can’t see any extensions whitelisted, although I assume ignored-files are the blacklisted ones, but py and cpp don’t appear in that list. I see `ignored-directories-with-content`includes .git, which I guess explains why git repos aren’t indexed. How do I change the settings to remove the .git ignore rule and add rules to include the extensions I want?