Bug 513167 - Near-exact filename match not prioritized highly enough in search results
Summary: Near-exact filename match not prioritized highly enough in search results
Status: CONFIRMED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 6.20.0
Platform: EndeavourOS Linux
: NOR normal
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2025-12-10 11:56 UTC by sayan
Modified: 2025-12-13 10:08 UTC (History)
5 users (show)

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


Attachments
The PDF is open and still Krunner can't find the file (261.59 KB, image/jpeg)
2025-12-10 11:56 UTC, sayan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sayan 2025-12-10 11:56:30 UTC
Created attachment 187488 [details]
The PDF is open and still Krunner can't find the file

SUMMARY
Krunner can't find files even when they are in the system and the directory is indexed. I've tried deleting and recreating the Baloo index but to no avail. 
In the given image, there is an example. The PDF was not found by Krunner. Even when I opened it, Krunner still doesn't find it.

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: EndeavourOS
KDE Plasma Version: 6.5.3
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.0

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2025-12-10 17:04:37 UTC
If you run `baloosearch6 "pmf ias physical geography"`, is the file found somewhere in the list"
Comment 2 sayan 2025-12-10 17:16:41 UTC
Yes it does:

baloosearch6 "pmf ias physical geography"                                                                                                          [22:40:48]
/home/sayan/Downloads/Telegram Desktop/PMFIAS-Environment-Thrid-Edition (1) (2).pdf
/home/sayan/Downloads/Telegram Desktop/PMF IAS - Indian Art and Culture.pdf
/home/sayan/Downloads/Telegram Desktop/26 Years UPSC IAS IPS Prelims Topic-wise Solved Papers.pdf
/home/sayan/Downloads/Telegram Desktop/geography-part-3.pdf
/home/sayan/Downloads/Telegram Desktop/VisionIAS PT 365 March 2025 Updated Part 1.pdf
/home/sayan/Downloads/Telegram Desktop/PMFIAS-Environment-Thrid-Edition (1).pdf
/home/sayan/Downloads/Telegram Desktop/PMF Geography 2024 Edition.pdf
/home/sayan/Downloads/Telegram Desktop/PMF IAS Indian Physical Geography.pdf
/home/sayan/Downloads/Telegram Desktop/PMFIAS-EG-Mineral-Resources.pdf
/home/sayan/Downloads/Telegram Desktop/PMF IAS Test Series 2025 Schedule (1).pdf
/home/sayan/Downloads/Telegram Desktop/PMFIAS-EG-Mineral-Resources-Sample.pdf
/home/sayan/Downloads/PMFIAS-Human-Geography.pdf
/home/sayan/Downloads/PMF IAS Physical Geography.pdf  <---Here
/home/sayan/Downloads/PMFIAS-EG-Industrial-Locational-Factors.pdf
/home/sayan/Documents/Academics/UPSC/GS 3/Economics/The Indian Economy by Sanjiv Verma (z-lib.org).pdf
Elapsed: 0.32666 msecs
Comment 3 Nate Graham 2025-12-12 19:31:56 UTC
So it looks like Baloo can find it, but it's fairly low down in the results list, which is weird because it'a nearly an exact filename match. As a result of that, it doesn't appear in KRunner's results list because it only shows the top 5 items, I believe.

Moving to Baloo, where it would need to prioritize this match more highly.
Comment 4 tagwerk19 2025-12-13 07:55:55 UTC
(In reply to Nate Graham from comment #3)
> So it looks like Baloo can find it, but it's fairly low down in the results
> list, which is weird because it'a nearly an exact filename match...

I think Baloo gives results sorted by "last modified", there would need to be another layer of filtering/sorting to prioritise phrase (or partial phrase) matches.

(In reply to sayan from comment #2)
> baloosearch6 "pmf ias physical geography"                                   

With the baloosearch you've done, the quotes are stripped by the shell so you are looking for just the four words in any order. You would need to quote the quotes to look for a phrase:
    $ baloosearch6 \"pmf ias physical geography\" 

I won't be able to help you much with krunner but it seems you can give it a quoted phrase "pmf ias physical geography"
Comment 5 sayan 2025-12-13 09:51:14 UTC
(In reply to tagwerk19 from comment #4)

> With the baloosearch you've done, the quotes are stripped by the shell so
> you are looking for just the four words in any order. You would need to
> quote the quotes to look for a phrase:
>     $ baloosearch6 \"pmf ias physical geography\" 

$ baloosearch6 \"pmf ias physical geography\"                                                                                                        [15:16:22]
/home/sayan/Downloads/Telegram Desktop/PMFIAS-Environment-Thrid-Edition (1) (2).pdf
/home/sayan/Downloads/Telegram Desktop/PMFIAS-Environment-Thrid-Edition (1).pdf
/home/sayan/Downloads/Telegram Desktop/PMF Geography 2024 Edition.pdf
/home/sayan/Downloads/Telegram Desktop/PMF IAS Indian Physical Geography.pdf
/home/sayan/Downloads/PMF IAS Physical Geography.pdf  <<---Here
Elapsed: 10.78 msecs

I did this and it's still the last thing baloo shows, weirdly placing Environment, a keyword not even in the search above it. Is baloosearch giving more priority to file contents?
Comment 6 tagwerk19 2025-12-13 10:08:16 UTC
(In reply to sayan from comment #5)
> ... Is baloosearch giving more priority to file contents? ...
No, no priority one way or the other. They are listed, as far as I can tell, simply by "last modified"

If you've indexed contents and just want to (command line) search for filenames, you can:

    $ baloosearch6 filename:\"pmf ias physical geography\" 

and it seems krunner accepts filename:"pmf ias physical geography"