Bug 452628 - Can not find a part of a word in a filename
Summary: Can not find a part of a word in a filename
Status: CONFIRMED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.91.0
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords:
: 453291 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-04-14 22:09 UTC by Oleksii Zolotarevskyi
Modified: 2023-03-18 21:35 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 Oleksii Zolotarevskyi 2022-04-14 22:09:37 UTC
SUMMARY
When the File Search (Indexing) is enabled, I can't find a file when I type a part of a word.
For example I can find the file with the name "text-example.txt" when I type "example" in the search field, but not when I type "xample". 

STEPS TO REPRODUCE
1. Enable File Search (indexing) in the System Settings
2. Search a file in Dolphin/Application Launcher/Krunner etc. by typing a part of a word hat is present in the filename.

OBSERVED RESULT
Filename that contains the entered part of a word is not found

EXPECTED RESULT
Filename is found

SOFTWARE/OS VERSIONS
Linux/KDE Plasma
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
The problem does not happen when the File Search is disabled. In that case searching for "xample" finds the file "text-example.txt".

The option to find the filename by the part of a word can be useful because a lot of Linux terms combine multiple words in a single word. For example I want to find the file with my notes about "libfprint". The file has "libfprint" in the name. I don't remember the full name "libfprint", but only that it contains "print". In that case I won't find the file by typing "print".
Comment 1 Nate Graham 2022-04-18 16:11:41 UTC
Does `baloosearch xample` in a terminal window exhibit the same problem?
Comment 2 Oleksii Zolotarevskyi 2022-04-18 17:19:09 UTC
(In reply to Nate Graham from comment #1)
> Does `baloosearch xample` in a terminal window exhibit the same problem?

Yes:
$ baloosearch -d ~/Downloads xample
Elapsed: 11,9903 msecs

$ baloosearch -d ~/Downloads example 
/home/user/Downloads/text-example.txt
Elapsed: 10,6788 msecs
Comment 3 tagwerk19 2022-04-27 08:03:07 UTC
(In reply to Oleksii Zolotarevskyi from comment #0)
> The problem does not happen when the File Search is disabled. In that case
> searching for "xample" finds the file "text-example.txt".
Checking on the current Neon Unstable - when Dolphin does a "filenamesearch" it finds results when searching for "xample" (happens for filename or content searches)

However when Dolphin invokes "baloosearch", it gives results for "example" and "examp" but not "xample"

... Think this is a "Confirm"
Comment 4 tagwerk19 2022-04-27 10:03:16 UTC
I've tried to get debug messages from baloosearch but I'm missing something (something obvious?)

I've created a

    ~/.config/QtProject/qtlogging.ini

file:

    [rules]
    *.debug=false
    kf.baloo.debug=true

And I can see "indexing" entries when I look at:

    journalctl -f

but I don't get anything extra when I try a baloosearch. What am I missing?
Comment 5 tagwerk19 2022-05-05 05:50:22 UTC
*** Bug 453291 has been marked as a duplicate of this bug. ***
Comment 6 Stefan Brüns 2023-03-18 16:22:05 UTC
Why does this bugzilla instance disallow any priorization, or categorizing?

This is not a bug, but currently intentional (so close this as Resolved/Intentional?).

But marking this as feature is not possible ...
Comment 7 tagwerk19 2023-03-18 17:59:35 UTC
If you want baloo to find you "example" when you search for "xample", that's a feature request 8-)

However, in dolphin, that you get a different behavour searching dependent on whether you have baloo enabled or not, or if you are searching from a folder indexed or not indexed by baloo, that is confusing.

I'd flag that as a bug...
Comment 8 Stefan Brüns 2023-03-18 19:06:13 UTC
(In reply to tagwerk19 from comment #7)
> If you want baloo to find you "example" when you search for "xample", that's
> a feature request 8-)
> 
> However, in dolphin, that you get a different behavour searching dependent
> on whether you have baloo enabled or not, or if you are searching from a
> folder indexed or not indexed by baloo, that is confusing.

But that is a bug in dolphin then. This bug has "frameworks-baloo" set as product.

Even if baloo supported searching for something like "*.xample.*", it can not support searching for files not indexed. So dolphin should (optionally) crawl the filesystem (slow), after having queried baloo (fast, allows metadata/content match).
Comment 9 tagwerk19 2023-03-18 21:35:27 UTC
(In reply to Stefan Brüns from comment #8)
> ... So dolphin should (optionally) crawl the filesystem (slow),
> after having queried baloo (fast, allows metadata/content match) ...
Talking ideal behaviours? I think probably so.

Dolphin should know what baloo has indexed, rely on baloo's results where it can, fall back to its own search when it cannot. Something that can give a "seamless" search if you are in your home folder in Fedora. It would be quite a project....