After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 739651 - Gnome Shell search randomly can not find certain files
Gnome Shell search randomly can not find certain files
Status: RESOLVED INCOMPLETE
Product: tracker
Classification: Core
Component: General
1.2.x
Other Linux
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2014-11-05 03:27 UTC by S.
Modified: 2021-05-25 17:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description S. 2014-11-05 03:27:56 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?
Comment 1 Martyn Russell 2014-11-11 10:13:20 UTC
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'.
Comment 2 Debarshi Ray 2014-11-11 10:58:18 UTC
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.
Comment 3 S. 2014-11-11 13:57:15 UTC
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.
Comment 4 Martyn Russell 2014-11-11 14:37:21 UTC
(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...
Comment 5 Debarshi Ray 2014-11-11 15:01:38 UTC
(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?
Comment 6 Martyn Russell 2014-11-11 18:37:27 UTC
(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 ...
Comment 7 Debarshi Ray 2017-09-24 18:47:40 UTC
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.
Comment 8 André Klapper 2021-05-25 17:54:14 UTC
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!