Bug 500972 - Search results within a category/runner don't seem to be ranked by frequency anymore
Summary: Search results within a category/runner don't seem to be ranked by frequency ...
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.3.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-03-02 19:14 UTC by insuna
Modified: 2025-11-16 07:43 UTC (History)
3 users (show)

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


Attachments
screenshot of plasma search settings (148.16 KB, image/png)
2025-03-06 09:20 UTC, insuna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description insuna 2025-03-02 19:14:03 UTC
SUMMARY
Right now when trying to use the search function / application launcher in the Overview effect the search results are basically a pseudorandom list of results, always the same depending on how far you progressed in typing the search term, but never ranked by usefulness. Most of the time when I want to launch an application quickly I enter the overview and start typing, but I will get a long list of incredibly useless results which I then either have to scroll through via the arrow keys or select the correct application with the mouse.
What would be much more convenient would be if KDE kept track of which applications I select for whichever keyword I entered and then ranked them by most used in the future that way I wouldn't have to spell "Softwar" and still get "Discover" as the top result until I have fully spelled out "Software" to open the Gnome Software center. Or spell out "Disco" and still "Discover" as the top result until I have spelled out "Discor" to be able to open "Discord".

To massage the Overview effect search into a facsimile of usefulness I have started to aggressively delete any `.desktop` files that may interfere with my frequently used applications, which comes with a whole host of other downsides, of course.

STEPS TO REPRODUCE
1. Enter the Overview effect
2. Start typing the name of an application you want to open
3. Observe a long list of absolutely useless results until you have fully typed out the complete name

OBSERVED RESULT
Trying to launch an application from the Overview effect yields a pseudorandom list of results with the actually useful/frequently used results having no change in prioritization

EXPECTED RESULT
Trying to launch an application from the Overview effect should in my opinion try to match the most frequently used applications by order of usage over full name accuracy

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.13.3-273-tkg-bore
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
Thanks for the good work! I have very few gripes with kde so far :)
Comment 1 Nate Graham 2025-03-05 16:20:22 UTC
This is just the standard KRunner-provided search; moving to KRunner.

Can you attach a screen recording that shows the issue happening?

And then can you also attach a screenshot showing the state of System Settings > Search > Plasma Search?
Comment 2 insuna 2025-03-06 09:20:26 UTC
Created attachment 179170 [details]
screenshot of plasma search settings

(In reply to Nate Graham from comment #1)
> This is just the standard KRunner-provided search; moving to KRunner.
> 
> Can you attach a screen recording that shows the issue happening?
> 
> And then can you also attach a screenshot showing the state of System
> Settings > Search > Plasma Search?

Hello Nate, thank you for your reply.
here's a video of me trying to start Discord from the search bar: https://youtu.be/UMAdwr6c5xM
I hope the attachment thing works for the screenshot.

Please do note that this is a feature request and not a bug report. I'm sure this is behaving as intended, I just think the intention should be configurable to make the search results more suited to my needs.
Comment 3 Nate Graham 2025-03-06 21:36:08 UTC
Thanks.

The reason I ask because KRunner is already supposed to order results within a category (as is happening here) by frequency of use. It seems like maybe it's not working though, as I can reproduce the same issue with those same two apps. If I type "disco" and open Discord 20 times using KRunner, Discover still always shows up first.
Comment 4 Nate Graham 2025-03-06 23:12:23 UTC
Yeah, I can see in my ~/.local/share/krunnerstaterc file that under [PlasmaRunnerManager][History], the sole item in there gets updated, but under [PlasmaRunnerManager], LaunchCounts= does NOT get updated.

So the ordering of items determined by launch counts in the past are now frozen.
Comment 5 Bug Janitor Service 2025-07-21 20:26:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/krunner/-/merge_requests/197
Comment 6 Nate Graham 2025-07-22 16:05:37 UTC
Git commit 413ad73fdab421e619a73f2f89c07825eb3e87c4 by Nate Graham.
Committed on 22/07/2025 at 16:05.
Pushed by ngraham into branch 'master'.

Save LaunchCounts immediately on launch if there were any matches

Writing on every run *is* necessary, or else `LaunchCounts` won't get
updated in a timely matter or at all.

Replace that with simpler logic to save to the config file only if there
were any launches. This also makes the autotest match the actual behavior.

Partially reverts 7cb4ff7e812e670c81a60c2b3f3126290ee74c2e
FIXED-IN: 6.17

M  +0    -5    autotests/runnermanagerhistorytest.cpp
M  +0    -5    autotests/runnermanagertest.cpp
M  +1    -2    src/runnercontext.cpp

https://invent.kde.org/frameworks/krunner/-/commit/413ad73fdab421e619a73f2f89c07825eb3e87c4
Comment 7 insuna 2025-11-16 07:43:45 UTC
When can it be expected for this fix to be rolled out? It says fixed in 6.17, but I still have the exact same issue on krunner 6.19.0.. 

Right now there aren't even any launch counts included anymore:
```
[PlasmaRunnerManager][History]
default=sett,disc,stra,fire
```
this is my entire krunnerstaterc file...