GNOME Bugzilla – Bug 739651
Gnome Shell search randomly can not find certain files
Last modified: 2021-05-25 17:54:14 UTC
Hello, I am having a very frustrating time with Gnome Shell's search mechanism. I have configured Tracker to index my entire home directory, and Gnome Shell's search options are also configured to search files in my home directory. Here are some *invented* file names to explain the sort of randomness I am seeing: ------------------------------------ ~/Documents/subfolder/aaa_bbb_ccc.odt ~/Documents/subfolder/aaa_ddd_eee.odt ~/Documents/subfolder/aaa_fff_ggg.odt ~/Documents/subfolder/aaa_hhh_iii.odt ------------------------------------ In this *fictitious* example, I have confirmed that all the files in ~/Documents/subfolder/ have been indexed, since if I search in Tracker for phrases from their content, the files are found by Tracker. However, when I search for parts of those filenames in Gnome Shell's activities overview search, the behavior is very strange. For example, with the above files if I type: - "aaa" -> finds only "aaa_bbb_ccc.odt" and "aaa_ddd_eee.odt". - "aaa_fff" -> finds nothing. - "ddd" -> finds nothing. - "eee" -> finds "aaa_ddd_eee.odt". - "fff" -> finds "aaa_fff_ggg.odt" - "ggg" -> finds nothing. - "aaa_hhh_iii" -> finds nothing. - "hhh" -> finds "aaa_hhh_iii.odt". - "hhh_iii" finds nothing. - "iii" -> finds "aaa_hhh_iii.odt". In other words, sometimes it never finds certain files that are indexed in Tracker, other times it finds a file by searching for the second word after the underscore, and other times with the third word but not the second word. It's really bizarre. Is there some weird handling of underscores in Gnome Shell's activity filename search?
Hi there, are you using a specific extension for this or just standard GNOME? I ask because there is a "tracker-search" extension you can use and need to know how to test this myself. The results highly depend on the query used by 'Shell' or 'tracker-search'.
I suspect that the reporter is using nautilus' search provider for this, and gnome-shell only offers the UI and is not involved in the actual search. What happens if you open nautilus, and try the same searches? You can just start typing after the window appears.
Hi, many thanks to both of you for looking into this. I'm not using any 3rd-part search extensions for Gnome Shell. I just have the Files search mechanism enabled in Gnome Shell search settings, and my entire /home directory is configured to be searchable. Nauilus search does work correctly, and finds all the possible results for a given query. I'm pretty sure you can reproduce this if you try searching inside a well-organized directory with a lot of files with longish names that start with the same word and contain underscores or *possibly* spaces too, although I don't use spaces in my filenames.
(In reply to comment #3) > Hi, many thanks to both of you for looking into this. > > I'm not using any 3rd-part search extensions for Gnome Shell. I just have the > Files search mechanism enabled in Gnome Shell search settings, and my entire > /home directory is configured to be searchable. > > Nauilus search does work correctly, and finds all the possible results for a > given query. > > I'm pretty sure you can reproduce this if you try searching inside a > well-organized directory with a lot of files with longish names that start with > the same word and contain underscores or *possibly* spaces too, although I > don't use spaces in my filenames. It's not the data set that I am concerned with, it's the query used to find results on that data set. Rishi, do you know where the code is to search in Shell using Tracker? The only places I know of are: a) tracker-search extension b) GtkSearchEngineTracker (in GTK+) c) NautilusSearchEngineTracker (in Nautilus) Are there any others? The alternative is, Tracker isn't even used...
(In reply to comment #4) > Rishi, do you know where the code is to search in Shell using Tracker? The only > places I know of are: > > a) tracker-search extension > b) GtkSearchEngineTracker (in GTK+) > c) NautilusSearchEngineTracker (in Nautilus) > > Are there any others? Well, the search providers come from applications. For nautilus it is NautilusSearchEngineTracker. I don't think GtkSearchEngineTracker can be accessed from gnome-shell because it is meant for the file chooser widget and not exposed as a search provider. Here is a brief overview of how the search providers work: https://wiki.gnome.org/HowDoI/SearchProvider > The alternative is, Tracker isn't even used... Possible. Maybe nautilus is not built with tracker support?
(In reply to comment #5) > (In reply to comment #4) > > > Rishi, do you know where the code is to search in Shell using Tracker? The only > > places I know of are: > > > > a) tracker-search extension > > b) GtkSearchEngineTracker (in GTK+) > > c) NautilusSearchEngineTracker (in Nautilus) > > > > Are there any others? > > Well, the search providers come from applications. For nautilus it is > NautilusSearchEngineTracker. I don't think GtkSearchEngineTracker can be > accessed from gnome-shell because it is meant for the file chooser widget and > not exposed as a search provider. > > Here is a brief overview of how the search providers work: > https://wiki.gnome.org/HowDoI/SearchProvider > > > The alternative is, Tracker isn't even used... > > Possible. Maybe nautilus is not built with tracker support? This is a distro decision I guess, but on Ubuntu 14.10 and Debian Jessie it seems to be using Tracker so ...
Ping. Is this still a problem? (In reply to Martyn Russell from comment #6) > This is a distro decision I guess, but on Ubuntu 14.10 and Debian Jessie it > seems to be using Tracker so ... AFAIK, Ubuntu used to be famous for not using tracker.
Closing this bug report as no further information has been provided. Please feel free to report this to https://gitlab.gnome.org/GNOME/tracker/-/issues/ if you can provide the information that was asked for in a previous comment and if this still happens in a recent and supported version. Thanks!