Bug 424871 - Dolphin does not search for files stored in secondary partitions if "Your files" button of the search bar is activated
Summary: Dolphin does not search for files stored in secondary partitions if "Your fil...
Status: RESOLVED DUPLICATE of bug 447119
Alias: None
Product: dolphin
Classification: Applications
Component: search (show other bugs)
Version: 20.07.80
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-31 17:11 UTC by Patrick Silva
Modified: 2023-01-01 23:18 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-07-31 17:11:13 UTC
SUMMARY
Currently I use 3 hard disks.
sda: root partition, partition of Windows 7 and an ext4 partition to store personal data
sdb and sdc: just one ntfs partition to store personal data each

Any file stored in any partition mentioned above is mine, but when "Your files" button of the search bar is activated Dolphin only searches for files stored in my Home. This seems confusing to me.

STEPS TO REPRODUCE
1. open Dolphin and press ctrl+f
2. activate "Your files" button
3. search for a file stored in a secondary partition

OBSERVED RESULT
Dolphin does not find your file stored in the secondary partition

EXPECTED RESULT
When "Your files" button of the search bar is activated, Dolphin should search for files stored in any partition of the system.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.72.0
Qt Version: 5.15.0
Comment 1 Patrick Silva 2020-07-31 17:28:17 UTC
Because this issue "From here (username)" and "Your files" buttons are redundant when the search bar is triggered inside Home. Both make Dolphin to search for files stored in Home only.
Comment 2 Ismael Asensio 2020-07-31 21:25:07 UTC
(In reply to Patrick Silva from comment #1)
> Because this issue "From here (username)" and "Your files" buttons are
> redundant when the search bar is triggered inside Home. Both make Dolphin to
> search for files stored in Home only.

When baloo search is enabled, "Your files" will search in all of the indexed folders (although by default this will be only 'Home'), so these two options are slightly different. 

But for non-indexed search these options are redundant as you well point, as they both search from 'Home' dir. We'll need to think of a possible solution to avoid this confusion.

Searching in all of the possible partitions (that is, from '/') doesn't seem viable as it can be quite slow. Users can still explicitly search from root folder for that case.
Comment 3 Patrick Silva 2021-08-05 18:38:07 UTC
(In reply to Ismael Asensio from comment #2
> But for non-indexed search these options are redundant as you well point, as
> they both search from 'Home' dir. We'll need to think of a possible solution
> to avoid this confusion.

maybe "Your files" button label could be changed to "Indexed files".
Comment 4 tagwerk19 2021-08-07 08:17:00 UTC
(In reply to Ismael Asensio from comment #2)
> When baloo search is enabled, "Your files" will search in all of the indexed
> folders (although by default this will be only 'Home'), so these two options
> are slightly different. 
> 
> But for non-indexed search these options are redundant as you well point, as
> they both search from 'Home' dir. We'll need to think of a possible solution
> to avoid this confusion.
This has been put together over time and quite likely needs second/third pair of eyes to make sure it's correct and hasn't missed anything important. It can also be that behaviour has evolved since the notes were made.

If you have baloo disabled (1)

    Dolphin runs a "there and then" filenamesearch, descending at your
    chosen folder (if you've selected "From here") or your home directory
    (if "Your files").

    You don't get the additional search options

If you have baloo enabled (and indexing $HOME)

    Dolphin queries baloo and gives results from your chosen folder and
    below (if you've selected "From here") or your home directory (if
    "Your files").

    You do get the additional search options

If you have baloo enabled (and are indexing, say, $HOME/Documents and $HOME/Downloads)

    If you have moved to Documents and are searching from there,
    dolphin/baloo will give you results from Documents (if you have
    selected "From Here") and from Documents and Downloads (if you have
    selected "Your files")

    But as you are querying baloo, you won't get results from areas that
    baloo hasn't indexed

    You do get the additional search options

    If you were searching "From here (Documents)" and then select "Your
    files", the "From here" jumps up to your home directory.

The same situation as above; baloo enabled and indexing $HOME/Documents and $HOME/Downloads

    But if you search "from" your home directory, dolphin ignores baloo and
    you get the same "filenamesearch" behaviour as (1),

    You don't get the additional search options

If you have baloo enabled (and are indexing $HOME and have excluded $HOME/Downloads)

    Dolphin queries baloo and gives results from your chosen folder and below
    (if you've selected "From here") or your home directory (if "Your files").

    As you are querying baloo, you won't get results from areas that baloo
    hasn't indexed, in this case the files in Downloads. You don't get a
    warning.

    You do get the additional search options

There are additional complexities. One being, if you have selected "Content" and dolphin is querying baloo, you also match filenames, whereas if dolphin is doing a "filenamesearch" (and you have selected "Content") you don't match filenames. You have to switch to searching for "Filename"

Ooo, and if baloo is enabled but the process has died, dolphin thinks its queries to baloo haven't found anything.

I think this is "mad complicated" 8-]
Comment 5 tagwerk19 2021-08-21 07:47:16 UTC
(In reply to tagwerk19 from comment #4)
> I think this is "mad complicated" 8-]
And also...

If you have baloo enabled (and are indexing, say, $HOME/Documents and $HOME/Downloads) and have symlink on your desktop to $HOME/Documents

    If you launch Dolphin, start at $HOME and move down to "Documents",
    Dolphin sees you in $HOME/Documents and gives the Baloo search options.

    If you launch Dolphin my clicking on the symlink on the Desktop,
    Dolphin sees you in $HOME/Desktop/Documents (and considers this not
    indexed by baloo) and you get the simpler filenamesearch dialog
Comment 6 tagwerk19 2021-12-18 09:34:46 UTC
Created a separate bug that summarises Dolphin/Baloo "symlink troubles", Bug 447119

I think this issue can be described in 447119 Case "2a" - together with, perhaps, "3"

Will flag this as a duplicate. If you feel that's wrong and I've missed or misunderstood something, reopen this issue and append details.

*** This bug has been marked as a duplicate of bug 447119 ***