Bug 483578 - File search doesn't seem to work, doesn't ever list any files
Summary: File search doesn't seem to work, doesn't ever list any files
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: search (show other bugs)
Version: 23.08.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-14 16:47 UTC by Ellie
Modified: 2024-04-27 05:57 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screen recording showing the file search not working (1.31 MB, video/webm)
2024-03-14 16:47 UTC, Ellie
Details
Cannot duplicate on latest Neon (KDE 6) (97.06 KB, image/png)
2024-03-15 16:48 UTC, Nick
Details
Screenshot of Dolphin search provider settings (or at least that's what I think this window is) (107.54 KB, image/png)
2024-03-27 23:12 UTC, Ellie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ellie 2024-03-14 16:47:17 UTC
Created attachment 167188 [details]
Screen recording showing the file search not working

SUMMARY

The file search doesn't seem to work for me. For some reason, it doesn't ever list any files, not even in seemingly obvious cases.

STEPS TO REPRODUCE

1.  See attached video. I entered some existing folder with an obviously existing file (not even in a subfolder), opened the search, typed a partial match for that file's name, and it gives me zero results.

OBSERVED RESULT

See video!

EXPECTED RESULT

Search lists the obvious results at least.


SOFTWARE/OS VERSIONS

Windows: 
macOS: 
Linux/KDE Plasma: openSUSE Tumbleweed-Slowroll 20240213 (x86_64)
(available in About System)
KDE Plasma Version: plasmashell 5.27.10
KDE Frameworks Version: KDE Frameworks  Version 5.113.0
Qt Version: Version 5.15.11 (built against 5.15.11)

ADDITIONAL INFORMATION
Comment 1 Nick 2024-03-15 16:48:21 UTC
Created attachment 167277 [details]
Cannot duplicate on latest Neon (KDE 6)

Hi

I did a quick test on the latest Neon (KDE 6) and this works fine. Conscious you are on 5.27 but on Tumbleweed. Are you able to re-test again when Tumbleweed upgrades you to 6.0? If the problem persists this might be a Tumbleweed specific issue, or specific to your system. 

Thanks.
Comment 2 Nick 2024-03-15 16:48:58 UTC
Needs more information - cannot duplicate on KDE 6.0 / Neon.
Comment 3 tagwerk19 2024-03-15 17:52:58 UTC
You could try the command line search:
    baloosearch filename:steam

You have also moved to the steam folder and are searching from there, you could try searching from your home folder and see whether that makes any difference.
Comment 4 Ellie 2024-03-15 18:31:22 UTC
From my understanding, baloo wasn't running and it should have used the built-in search of Dolphin. However, I have to admit I found the UI about what search provider was actually used or enabled fairly confusing, so I'm actually not sure.
Comment 5 tagwerk19 2024-03-16 07:53:42 UTC
(In reply to Ellie from comment #4)
> ... I have to admit I found the UI about what
> search provider was actually used or enabled fairly confusing ...
Indeed, it seems very well hidden :-/

The command line "baloosearch" will give you a way of searching exactly "what has been indexed", sometimes the extra layer on top from Dolphin muddles things a bit.
    
So if you know you have Alice in Wonderland on your disk, you should find it with:
    $ baloosearch filename:Alice
and if you are content searching
    $ baloosearch Cheshire Cat

If you have Baloo disabled (you can check with "balooctl status"), Dolphin should choose to search with its own "there and then" search. In the old days, there would be a pause while that happened and you'd hear the Hard Disk rattling.

You can see whether Dolphin will ask Baloo or doing a "there and then" search by looking at the search prompt. If you do a Ctrl-F to get the prompt and it looks like this:
    
    https://bugsfiles.kde.org/attachment.cgi?id=137170
        
then you will be doing the "there and then" (filenamesearch) search. If however you see extra search options (the "Any Type", "Any Rating" etc) as here:
    
    https://bugsfiles.kde.org/attachment.cgi?id=137169
        
then Dolphin knows it can ask baloo for its search results (baloosearch)
Comment 6 tagwerk19 2024-03-16 08:19:20 UTC
The thing to watch for is ...

If "baloosearch" doesn't give you any answers, that is Baloo has not indexed your "steam" folder ...

... But Dolphin thinks it has
Comment 7 Ellie 2024-03-27 23:12:34 UTC
Created attachment 167872 [details]
Screenshot of Dolphin search provider settings (or at least that's what I think this window is)

The baloosearch libraries were definitely installed, I think openSUSE pulled those in, while the baloo indexer was not. The indexer might be installed now but isn't running and probably wasn't ever, the service is disabled. I suggest Dolphin should probably detect this situation if that's a problem.

But the dolphin search settings window honestly doesn't look like ANY search provider is known to it, for whatever reason. It doesn't seem to me like it's trying to use baloo, but see for yourself on the screenshot I guess. I can't quite figure out what it's showing me.
Comment 8 Bug Janitor Service 2024-04-11 03:48:01 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Ellie 2024-04-11 05:38:34 UTC
Is there useful information I could still provide?
Comment 10 Nick 2024-04-11 06:14:12 UTC
Moving back to 'reported' in case anyone else can review and possibly duplicate. Needs further triage.
Comment 11 bugs_kde_org 2024-04-26 15:56:30 UTC
I can confirm. Problem still exists. In my case, problem probably is related to sleeping (I restarts laptop one time per 2-3 week). When I restart laptop, then baloo start working for few minutes and that's all. After few minutes, baloo show idle and stop working.
When I started to use baloo (I didn't have database installed one month ago), first time baloo stucked at directory with sylpheed mails. Next, stucked at thunderbird directory and last, stucked at some image (if I remember well). When I excluded these directories, baloo started work and indexed files and stucked at 99% (132 files remaining). Since one week, baloo can't index any file, but "iotop -o" show, that "baloo_file_extractor" read disk all the time (max about 150KB/s)
Comment 12 bugs_kde_org 2024-04-26 16:02:21 UTC
I tried everything. I tried to use KDE GUI and console app. Button Pause indexer doesn't work.
I tried to disable and enable baloo, but it doesn't work. I mean it doesn't resolve problem.
Is there any chance to restart baloo? Like systemctl restart sddm.service?
I tried it, but I don't know how to do that.
Comment 13 Ellie 2024-04-26 16:28:10 UTC
As for me, I intentionally don't use baloo. I usually just search by file name and in the same folder or subfolders of it anyway. However, just the presence of the client-side baloo libraries with the indexer either not even installed, or the indexer installed but never used, Dolphin seems to automatically use it as the *only* search backend with no obvious way to bypass that.
Comment 14 tagwerk19 2024-04-26 17:17:25 UTC
Baloo does need more work to deal well with emails :-/
 
It can handle message/rfc822 format messages (where there is one msg per file) but reads them as text. If you have encoded attachments, Baloo indexes, ouch, everything. See Bug 460882. Baloo should really extract the text/plain part (or the text/html if there is no text/plain)

It tries to read mbox files (where there are many messages concatenated in one file) but these can grow to GByte sizes, best to exclude those. See Bug 443547.

Thunderbird holds its database of messages as a tree of files under ~/.thunderbird,  Thunderbird has its own pretty good indexing and searching though. You might be indexing those if you enabled "index hidden files". If you are indexing hidden files/folders it's probably best to exclude folders like .cache, .local/share/Trash, .mozilla and .thunderbird, Bug 434705.

If disabling Baloo does not seem to work, it may be in the middle of trying to index a GByte mbox. You can kill the processes with systemctl:

    systemctl --user stop kde-baloo

Note that Dolphin uses the Baloo index if Baloo is enabled and you are "in" a folder that Baloo has indexed. Otherwise it does a "there and then" search with filenamesearch (at least on Neon and Fedora, I'd need to check with Tumbleweed). Unfortunately, it is not particularly easy to see whether Dolphin is querying Baloo or not...
Comment 15 Ellie 2024-04-26 17:34:42 UTC
"Note that Dolphin uses the Baloo index if Baloo is enabled and you are "in" a folder that Baloo has indexed. Otherwise it does a "there and then" search with filenamesearch (at least on Neon and Fedora, I'd need to check with Tumbleweed)."

This doesn't seem to be working for me. That's basically why I made this bug report. It seems to always do a baloo search but with zero results.
Comment 16 tagwerk19 2024-04-26 17:46:33 UTC
(In reply to Ellie from comment #15)
> ... This doesn't seem to be working for me ...
Let me try a Tumbleweed... Will be back asap :-)
Comment 17 tagwerk19 2024-04-27 05:57:00 UTC
(In reply to tagwerk19 from comment #16)
> Let me try a Tumbleweed... Will be back asap :-)
I've a very vanilla tumbleweed installed (openSUSE-Tumbleweed-DVD-x86_64-Snapshot20240425-Media.iso) and it behaves nearly as it should...

Have a look at ~/.config/baloofilerc, if you've disabled Baloo you should see:

    [Basic Settings]
    Indexing-Enabled=false

at the top of the file. This would be set if you disable via System Settings > Search.

I have a memory, of an Arch system I think, where it wasn't possible to get that to "stick", the config was rewritten by something and Baloo reenabled. You had to disable Baloo and set the file read-only to get round that (Bug 481101)