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 760366 - Gnome Shell overview search doesn't return results on indexed paths outside user home
Gnome Shell overview search doesn't return results on indexed paths outside u...
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: File Search Interface
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 710786 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-01-09 16:01 UTC by sealbhach
Modified: 2018-06-28 17:42 UTC
See Also:
GNOME target: ---
GNOME version: 3.17/3.18



Description sealbhach 2016-01-09 16:01:19 UTC
Running Fedora 23, I have my OS and /home partitions on an SSD which appear are on /dev/sdb. I have a lot of movies and data on a spinning disk HDD which appears in the filesystem as /dev/sda. 

I have set up the data folders in /dev/sda under tracker-preferences to be indexed and return results.

The search tool (which appears when I press Super button) only returns results for /home folder, none of the /data results appear.

However they are indexed by tracker because the results from /data appear when I search on the command line using tracker-search. 

I found this thread on the Arch Linux forums showing another user has experienced this problem:

https://bbs.archlinux.org/viewtopic.php?id=200932

I tried all the steps suggested in that thread but did not get a resolution.
Comment 1 Domenico 2016-03-10 15:18:31 UTC
Yes, same issue in my system (Fedora 23), with home folders "Documents", "Pictures", "Music", "Download" and "Video" that are symlinks pointing to correspondent folder in /mnt/data.

With this scenario, I never had problems in recent years. This bug has only appeared in recent times.
Comment 2 krinkodot22 2017-08-02 04:10:40 UTC
I'd also like to see this fixed. I keep most of my large files on a dedicated data partition mounted at boot time (which is probably a common enough setup) located in /mnt/, and it would be nice to be able to search for files on that partition with the Overview search.

Currently, the only way around that limitation is to mount partitions in your own home directory. But then, other users won't be able to use the Overview to search for those files.

Another use case for this feature is being able to search for files that are shared by another user. For example, if userA owns /home/userA/sharedFiles and gives other users read/execute permissions for it, userB should be able to add that directory as a search path and use the Overview to search for files in it. Currently, this is not possible.
Comment 3 krinkodot22 2017-08-02 13:55:15 UTC
Some more points I'd like to mention:

-Tracker currently does not enter symbolic links when indexing (see Bug 726264), so making a symlink to a non-home directory and placing it in a Search Location under /home/<user>/ still won't make its files searchable in the Overview.

-Other search providers are able to find files under non-home locations just fine, so this is not a general limitation of the Overview search. An example is Documents, whose search provider can find files in any Search Location.
Comment 4 Carlos Soriano 2017-08-07 14:07:21 UTC
You can add new folders to be searched in the "Search" panel in GNOME Control Center.
Comment 5 krinkodot22 2017-08-07 17:05:46 UTC
That's true, but even when adding a folder in Control Center's "Search", its contents will not appear in Nautilus' Overview search results if that folder does not reside under /home/<current user>.

Quick steps to reproduce:

1. In a terminal, run:
  sudo mkdir /home/spare && sudo chown <current-user>:<current-user> /home/spare

2. Place a document file (like a pdf or a Word/OpenOffice doc) in /home/spare and ~/Documents.

2. Enter the Control Center->Search.
 2a. Enable "Documents" and "Files" as search providers.
 2b. click the gear button in the bottom-right corner, and enable "Documents" as a search path in the "Places" tab, and add /home/spare as a search path in the "Other" tab.

3. Wait a minute to let Tracker index everything. Run 'tracker daemon' to check whether it's finished or not.

4. In the Overview, search for the file you added to /home/spare and ~/Documents.

Expected results:
The file will appear in the Overview as a Nautilus/Files search result, and as a Documents search result.

Actual results:
The file will only appear as a Documents search result. i.e. Documents does not require files to be under ~, but Nautilus does.
Comment 6 Carlos Soriano 2017-08-07 21:09:43 UTC
weird, thanks for testing. We just send tracker queries, so I'm not sure what's going on. Something for our search expert, Alex.
Comment 7 António Fernandes 2017-08-23 19:34:14 UTC
*** Bug 710786 has been marked as a duplicate of this bug. ***
Comment 8 António Fernandes 2017-08-23 23:40:56 UTC
Looking at the code in nautlus-shell-search-provider.c, it seems that the user's home is indeed the scope of the search:

    home = g_file_new_for_path (g_get_home_dir ());
...
    nautilus_query_set_location (query, home);
Comment 9 Carlos Soriano 2017-08-24 15:16:01 UTC
I wonder if we should just fire the tracker search for the shell search case, and don't limit it to home then.
Comment 10 António Fernandes 2017-08-24 15:26:39 UTC
I think that is the correct and expected behavior, yes.

Is it possible to issue a "generic" query, without a set location?
Comment 11 Carlos Soriano 2017-08-24 16:02:35 UTC
To make it clear, I mean not doing a recursive search in the directories manually, and only use tracker search.

Using only tracker, I think so yes.
Comment 12 krinkodot22 2017-11-19 08:51:15 UTC
As of Tracker 2.0 and Gnome 3.26, the Overview Search finds files in linked locations, as long as the link is under $HOME. So for example, linking $HOME/ExtraFiles to /mnt/HDD (and setting the former as a Search Location) would let the contents of /mnt/HDD to be searchable in the Overview.

From what I can tell, this is possible because Tracker now recurses into symlinks.

However, setting a non-home folder as a Search Location still doesn't let its contents appear in search results. So for the above example, setting /mnt/HDD itself as a Search Location won't make its contents appear in search results. The only way to make it work is for a link under $HOME to point to it.

Still, this is a big improvement!
Comment 13 krinkodot22 2018-06-24 02:40:18 UTC
Reposted in GitLab: https://gitlab.gnome.org/GNOME/nautilus/issues/502