Bug 467216 - Cannot search hidden files and folders with built-in search; have to use Baloo file search
Summary: Cannot search hidden files and folders with built-in search; have to use Balo...
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 22.12.3
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-11 20:29 UTC by David
Modified: 2024-06-01 20:53 UTC (History)
6 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 David 2023-03-11 20:29:03 UTC
SUMMARY
I want to be able to search hidden files and folders with KDE's file manager (Dolphin) like it works with Windows Explorer. But (a) it won't let me search for hidden files and folders unless I index the folders where I want this first; (b) the search settings work independently of what's configured in Dolphin. 

STEPS TO REPRODUCE
1. Go to System Settings -> Search -> File Search.
2. Try to enable searching hidden files and folders without building an index.

OBSERVED RESULT
Not possible.

EXPECTED RESULT
Should let me search hidden files and folders without indexing pre-selected folders beforehand, like MS Windows does. Moreover, it should recognize when I search from Dolphin whether I want hidden files/folders from the setting that I am putting in Dolphin.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-6-amd64 (64-bit)
Graphics Platform: X11
Processors: 20 × 12th Gen Intel® Core™ i7-12700H
Memory: 62.5 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: SLIMBOOK
Product Name: Executive
ADDITIONAL INFORMATION
Comment 1 Nate Graham 2023-03-13 21:07:38 UTC
> Try to enable searching hidden files and folders without building an index
That's not how the Baloo file indexing service works; it's inherently index-based. It builds an index and when when you search for something, it consults its index.

If you want a non-indexed search that crawls the filesystem in real-time, you might appreciate the KFind app.

What's wrong with the index-based search that makes you want to not use it?
Comment 2 David 2023-03-14 16:32:02 UTC
(In reply to Nate Graham from comment #1)
> > Try to enable searching hidden files and folders without building an index
> That's not how the Baloo file indexing service works; it's inherently
> index-based. It builds an index and when when you search for something, it
> consults its index.
> 
> If you want a non-indexed search that crawls the filesystem in real-time,
> you might appreciate the KFind app.
> 
> What's wrong with the index-based search that makes you want to not use it?

(a) This search is nevertheless embedded into other apps, such as Dolphin. It doesn't give an option to switch my global KDE search backend to KFind instead of baloo.
(b) I very seldom need to search files in KDE software so I don't benefit from an index.
(c) This is only used in KDE software. Other software doesn't rely on it when searching.
(d) I have many files. I don't want to be telling baloo what to index or what not.
(e) Indexing is a resource-heavy operation, and even the GNOME indexer consumes too many resources for my setup.
(f) There's little speed difference in searching for just file names with or without an index.
(g) Indexes use extra space and produce extra wear and tear on my disk.
Comment 3 tagwerk19 2023-03-14 22:18:26 UTC
(In reply to David from comment #0)
> ... enable searching hidden files and folders without building an index ....
This is the same as Bug 467208?

There is a "fallback" within dolphin to do "there and then" searches when you don't have baloo running or you have moved to a folder that baloo has not indexed and are searching from there. It seems though that that search does not hunt down through hidden folders as you might expect if you have told dolphin to show hidden files.

Probably worth fixing.

Flaggings as confirmed on the basis of https://bugs.kde.org/show_bug.cgi?id=467208#c4 but maybe this will end up as a duplicate...

The fact that dolphin falls back to its own searching is a bit of a hidden (and sometimes confusing) feature :-/
Comment 4 tagwerk19 2023-03-15 08:05:43 UTC
A couple more thoughts...

Indexing file content can indeed be heavy - think that the indexer has to extract the text from each file it meets. If you disable content indexing, indexing is fast, does not generate very large indexes and would give you your filename search in hidden folders.
Comment 5 David 2023-03-15 16:29:48 UTC
(In reply to tagwerk19 from comment #3)
> (In reply to David from comment #0)
> > ... enable searching hidden files and folders without building an index ....
> This is the same as Bug 467208?
> 
> There is a "fallback" within dolphin to do "there and then" searches when
> you don't have baloo running or you have moved to a folder that baloo has
> not indexed and are searching from there. It seems though that that search
> does not hunt down through hidden folders as you might expect if you have
> told dolphin to show hidden files.
> 
> Probably worth fixing.
> 
> Flaggings as confirmed on the basis of
> https://bugs.kde.org/show_bug.cgi?id=467208#c4 but maybe this will end up as
> a duplicate...
> 
> The fact that dolphin falls back to its own searching is a bit of a hidden
> (and sometimes confusing) feature :-/

It's not just dolphin - krunner is also connected with this.
Comment 6 Nate Graham 2023-03-15 16:34:07 UTC
If you want this to work systemwide, you're essentially asking for an entirely new optional search system to replace Baloo in all of the places where it's currently used.

Such a thing is possible, of course. But please realize that it's a big request. :) Probably something that's bigger in scope than can reasonably be encompassed by a bug report/feature request. See also https://community.kde.org/Get_Involved/Issue_Reporting#Step_1:_Make_sure_it's_a_valid_bug_or_feature_request.
Comment 7 David 2023-03-15 16:35:54 UTC
(In reply to Nate Graham from comment #6)
> If you want this to work systemwide, you're essentially asking for an
> entirely new optional search system to replace Baloo in all of the places
> where it's currently used.
> 
> Such a thing is possible, of course. But please realize that it's a big
> request. :) Probably something that's bigger in scope than can reasonably be
> encompassed by a bug report/feature request. See also
> https://community.kde.org/Get_Involved/Issue_Reporting#Step_1:
> _Make_sure_it's_a_valid_bug_or_feature_request.

But it doesn't need to change the backed, just to let baloo search for hidden files too like it is currently doing for non-hidden files without indexing.
Comment 8 Nate Graham 2023-03-15 16:39:40 UTC
Baloo is an index-based search system. It doesn't work without an index. "Baloo, but without indexing" is a new search system. :) 

Maybe this is a communication issue because we're using the word "index" to mean different things. Because you said:

> like it is currently doing for non-hidden files without indexing.

That's not the case; Baloo always uses indexing. If Baloo is turned on, it's indexing things. If indexing isn't happening, then Baloo is disabled. If you've got Baloo disabled and you search in Dolphin, it is indeed searching without indexing... but this is not a systemwide search. It's just Dolphin's own in-app non-Baloo search. It doesn't exist outside of Dolphin and it isn't tied into any of the places where you can initiate searches in other contexts.
Comment 9 ttrovo 2023-08-18 07:06:12 UTC
Thank you Nate Graham for you work on the best file manager for GNU/Linux, I really appreciate your afford on fixing other issues I was complaining about or following.

Related to this topic: a lot of other people and I have `baloo` completely disabled (maybe not even installed) and Show Hidden Files set to always-on.

Can somehow we make search in Dolphin work as expected, more reliably? I mean as Dolphin is great, it is more convenient to search in it compared to open kfind in a separate window or use krusader manager. But **currently Dolphin does not find files that are there**. Like imagine, I have this in the current directory directory:
```
./.something/foobar.txt
./.foobar.txt
```
I see both items because I have always-on Show Hidden Files on all systems I have ever used, including Windows.

But if I search in Dolphin for "foobar" it find nothing! 
Note that `Krusader`, `KFind` and `mc` work differently, well, almost ANY file manager is able to find this files.

It would be great if this issue will be possible to address, because people are really waiting for it for a long time. 

E.g.: here is a link to a popular reddit topic where people discuss search in Dolphin and consider it to be "broken".
https://www.reddit.com/r/kde/comments/smlevb/dolphin_search_doesnt_work_well_any_way_to_make/

Maybe the the issue should be considered a bug, as a lot of people really do consider it that way. Almost nobody will say that it is not a bug not to find files when they exist.
Comment 10 ttrovo 2023-08-18 07:11:27 UTC
Oh, I forgot to add my use-case of having DATA LOSS due to this search problem.

I eventually forget that search is not working reliably in Dolphin and this happens:

1. I open directory and check there it has no valuable files based by names. To do that I search for some sub-string like "important" using Dolphin search.
2. I delete the directory expecting it to lack valuable files.
3. The files where really there, like: `subdir/.local/important`. Dolphin failed to find them but successfully removed them.

I had these situation multiple times myself in real life, so it is not far-fetched at all.
Comment 11 tagwerk19 2023-08-18 12:06:29 UTC
(In reply to ttrovo from comment #9)
> ... I have `baloo` completely disabled ... and Show Hidden Files set to always-on ...
It's an issue then with Dolphin's "There and Then" search, as per:
    https://bugs.kde.org/show_bug.cgi?id=463830#c3
Comment 12 ttrovo 2023-08-18 12:19:07 UTC
(In reply to tagwerk19 from comment #11)
> (In reply to ttrovo from comment #9)
> > ... I have `baloo` completely disabled ... and Show Hidden Files set to always-on ...
> It's an issue then with Dolphin's "There and Then" search, as per:
>     https://bugs.kde.org/show_bug.cgi?id=463830#c3

Thank you for the link. But #463830 has quite a different problem, related but different, has it not?
Because it is about the difference of results with or without baloo. People do not care about baloo and consistency with its results.
What they care about is the fact that **search does not find files that exist in the directory**.

The main point is that the only correct way to search files is to find those files, especially when Show Hidden Files is ON. Because all other search apps and file manager do it, so, it is what people expect. Otherwise it is an actual bug, not a feature.
Comment 13 tagwerk19 2023-08-19 06:28:44 UTC
(In reply to ttrovo from comment #12)
> ... a different problem, related but different ...

You've disabled baloo indexing and are seeing the "There and Then" search behaviour: you've told Dolphin to show hidden files and yet a search doesn't display matches of hidden files or files in hidden folders. I think that's clear.

Think that other people might be indexing a subset of folders and are trying to work out why searching from their home directory gives different answers than when moving down and searching from an indexed folder. In Fedora, by default your home folder is not indexed, your Documents folder is. That's definitely confusing...
Comment 14 Jack 2024-02-23 03:30:51 UTC
This just caught me too.  In my home directory, in konsole, "ls -altr .xauth*" shows several .xauth.... files.  Invoking "dolphin ." and searching does not show them.  I find this very disconcerting.  (I do have baloo disabled, and show hidden file turned on.)  I want to use dolphin, because I want to easily delete all except the most recent version of hidden files starting with the same few characters (.xauth..... in this case.)  Am I missing some other way to do this?