Bug 436737 - Dolphin search takes a long time and frequently fails showing results
Summary: Dolphin search takes a long time and frequently fails showing results
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: search (show other bugs)
Version: 21.04.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-07 15:55 UTC by goo
Modified: 2021-12-17 14:01 UTC (History)
3 users (show)

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


Attachments
dolphin failing showing search results (104.18 KB, image/png)
2021-05-07 15:55 UTC, goo
Details
kdeinit5 crashing after searching for a string in dolphin "content search" (4.27 KB, text/plain)
2021-05-09 17:27 UTC, goo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description goo 2021-05-07 15:55:29 UTC
Created attachment 138215 [details]
dolphin failing showing search results

SUMMARY

I use baloo to index some folders inside my homedir.
When searching file contents with baloosearch I instantly get results without any issue.
When using dolphin to search for file contents, searching get some time, in the order of a few secods to ten of seconds, and sometimes dolphin fails showing results that are otherwise showing with baloosearch.

STEPS TO REPRODUCE
$ balooctl status
Baloo File Indexer is running
Indexer state: Idle
Total files indexed: 5.352
Files waiting for content indexing: 0
Files failed to index: 0
Current size of index is 17,23 MiB

$ balooshow /home/goo/Documenti/i6210e.pdf
e5cd400000033 51 941268 /home/goo/Documenti/i6210e.pdf
        Mtime: 1620400385 2021-05-07T17:13:05
        Ctime: 1620400385 2021-05-07T17:13:05
        Cached properties:
                Author: FAO
                Title: Guidelines on urban and peri-urban forestry
                Document Generated By: Adobe PDF Library 15.0
                Creation Date: 2016-10-28T09:28:59.000Z

OBSERVED RESULT
Dolphin fails showing results for "forestry" (see attachment)

$ baloosearch "forestry"
/home/goo/Documenti/i6210e.pdf
Elapsed: 0,207911 msecs

EXPECTED RESULT
Dolphin should list file i6210e.pdf


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 34
(available in About System)
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.82
Qt Version: 5.12.2
Comment 1 goo 2021-05-09 17:27:53 UTC
Created attachment 138274 [details]
kdeinit5 crashing after searching for a string in dolphin "content search"
Comment 2 goo 2021-05-09 17:28:44 UTC
After upgrading to KDE Frameworks 5.82 (in the original report I was on 5.81 and not on 5.82), searching for a string in dolphin now causes kdeinit5 to crash after waiting for results for a few seconds. I attached the crash report.
Comment 3 goo 2021-06-17 15:02:22 UTC
Baloo is still broken on my system after upgrading to Plasma 5.22.1 and Frameworks 5.83.
Now searching for a file doesn't cause kdeinit5 to crash anymore but results are totally inconsistent and take several minutes to complete with a database index just under 100 MiB. It should be nearly instant.

Also, File Search settings window shows that baloo is stuck on indexing a file whereas "balooctl status" shows it is "idle" with no other files waiting to be indexed. I purged and recreated the database to no avail.

I use btrfs filesystem without any snapshots. On another laptop I have, also with btrfs, baloo seems to work fine with no issues so far.

I have a feeling that this bug is not being addressed as it is not confirmed so far. It might be that I am the only one experiencing these issues, so could it be a misconfiguration on my part triggering this bug? Is there something more I can do to help with the issues I have?
Comment 4 goo 2021-06-17 15:08:39 UTC
Sorry, about the previous comment, I meant that searching _within dolphin_ doesn't work as expected, not baloo in itself. Searching for file contents with baloosearch works pretty fast without issues.
Comment 5 tagwerk19 2021-06-17 20:16:22 UTC
Just looking at the original bug - not the crash. If the crash is reproducable maybe open another bug.

Summary: Sometimes software can be far too clever...

The attachment shows that Dolphin is doing a "filenamesearch". It would normally do a "baloosearch" however it knows that baloo can be set up just to index a subset of folders and it knows that if it is not "in" one of those folders then using baloo doesn't make sense.

You are using Fedora?

Try moving to the Documents folder in Dolphin and searching again. I'm guessing, with a Ctrl-F, that you'd see a slightly different search dialog, you had something like:
    https://bugsfiles.kde.org/attachment.cgi?id=137170

With baloo running / dolphin in an indexed folder, it should look like:
    https://bugsfiles.kde.org/attachment.cgi?id=137169
    (Taken from in Bug 435119)

So why might "Fedora" be an issue?

Fedora used to, and I think still does, indexes the Documents, Music, Pictures and Video folders, not everything under $HOME... You can see this in the System Settings > Search

You were in "Home" and Dolphin did a filenamesearch scan through all your files reading each in turn (so, yes, might be slow). Filenamesearch, despite the name, can also search content however I'm not sure whether it can read PDF's
Comment 6 goo 2021-06-20 01:49:30 UTC
You are completely right.
I am on Fedora and I always thought that searching in "Your Files" would lead to search for content in folders indexed by baloo. If I wanted to search in my home dir I would rather go to my home dir and search from there.
Indeed the tab "Your files" becomes pointless when you are already placed in the home directory, this is why I always thought it would mean "your files indexed by baloo" and I believed it was an handy shortcut to search through all your indexed content without the need to manually search in indexed folders one by one. How one can accomplish this with dolphin?

So the bug can be considered resolved. Thank you for having unveiled the right meaning, it was not obvious to me, even if I still find that searching through all the indexed folders at once is a feature that dolphin lacks.
Comment 7 tagwerk19 2021-06-20 10:42:06 UTC
(In reply to goo from comment #6)
> ... it was not obvious to me ...
I think the the "subtle clues" about what is going on are bit too subtle :-)

There might be room for a wishlist entry for when dolphin is doing a filenamesearch, it should first give you any baloo results it has and then go off searching on its own.

Good Luck! I will close the bug. Will say "Resolved, Fixed"