Gnome Activities Overview Search with Substring

Hi everyone,

I’ve noticed that when I search for files using the GNOME Activities Overview search, it doesn’t return files if I type a substring that’s inside the filename — for example, searching for “apple” doesn’t find a file named 001_apple_tree.png.

After some clarification from the dev in LocalSearch (which I think was previously known as tracker3), it seems like the search results in the GNOME Activities Overview search come from a search provider installed by Nautilus (Files), instead of LocalSearch. Unlike searching with LocalSearch in the terminal, I can find that file easily with the command localsearch search -f apple, so I know it’s indexed at least by LocalSearch. But the Activities Overview search seems to only find those files matching the entire word, not substring, i.e., I need to type “001_apple” in order to find such a file.

I am not sure if it’s a bug, or if it’s intended. But I am still wondering if there is any way, maybe through settings, extensions, or a custom search provider, to enable substring searching in Gnome’s Activities Overview search? I’m looking for something that can seamlessly integrate into the Activities Overview search bar.

(Environment: Fedora 42 with GNOME 48.2.)

(Also, not sure is if it’s correct, but I vaguely remember that substring search used to work in several versions of GNOME ago, but stopped working in recent versions. Please do correct me if I misremember.)

Thanks in advance!


Edit:

I just tested it on a freshly installed Fedora 42 (with GNOME 48.2) running on VirtualBox, and apparently, the substring search works perfectly in this new virtual machine. However, it does not function on my actual main machine, which is also running Fedora 42 (with GNOME 48.2) but was upgraded all the way from Fedora 39 version by version.

I’m not sure why this discrepancy occurs. And I am wondering if there is any method to reset the index by Nautilus to maybe fix this issue.

Hi, the search results in the I overview are from nautilus, but it uses localsearch as one of the backenends, so I’m not sure where the discrepancy is from, maybe nautilus is not using the same database as localsearch? What distro are you using, is nautilus running sandboxed somehow?

As I mentioned in my post, I have tested in two different environments:

  • Actual Physical Laptop Machine: Running Fedora 42 (with GNOME 48.2), which was upgraded all the way from Fedora 39 version by version.
  • VirtualBox Virtual Machine: A fresh installation of Fedora 42 (with GNOME 48.2).

It appears that the substring search works correctly in the GNOME Activities Overview on the freshly installed Fedora 42 (with GNOME 48.2) in the virtual machine. For example, I can search for apple and successfully locate the file 001_apple_tree.png.

However, on my actual physical laptop, which is also running Fedora 42 (with GNOME 48.2) but was upgraded from Fedora 39, I cannot find the file using the search term apple. Instead, I have to type 001_apple to locate the file 001_apple_tree.png.

I am not sure if this issue is due to the database that Nautilus uses becoming corrupted during the Fedora version upgrade process, as I upgraded through several versions by versions. So despite GNOME Activities Overview search provider Nautilus also using LocalSearch as its backend, it cannot produce the same results as just using LocalSearch to search.

And if that’s the case, I am wondering if there is a method to reset/reconstruct the database that Nautilus is using.

The database should be under .cache/tracker3 if it’s not that, maybe it’s localsearch’s dconf settings?

After deleting the previous index database located in ~/.cache/tracker3, I reset the LocalSearch using the command localsearch reset -s. I then rebuilt the entire LocalSearch database and reset the GNOME desktop settings with the command dconf reset -f /org/gnome/.

However, the substring search still does not work on my physical laptop running Fedora 42 with GNOME 48.2.

I’m trying to see if this is similar to my issue, I’m having problems searching files with specific filenames as well. @carter Is the same issue observable when the file is instead named with hyphens i.e. 001-apple-tree.png or 001_apple-tree.png?

I tested a situation where I had a list of files named:

  • 001_apple_tree.png
  • 001_apple-tree.png
  • 001-apple_tree.png
  • 001-apple-tree.png

When searching for apple in the GNOME Activities Overview, only the files 001-apple_tree.png and 001-apple-tree.png were found. This indicates that the issue is certainly related to the underscore _.

I also reinstalled my entire laptop with a fresh installation of Fedora 42, restored all my files using Déjà Dup Backups, and reindexed all files with LocalSearch. However, the issue still persists.

I’m running a blank on this, and seeing that there’s a bunch of search-related commits and MRs in Nautilus that are already merged or WIP (including a massive refactoring), I’ll probably just wait to see if this persists in 49.