Bug 399834

Summary: Add priority ordering to KRunner plugins for returned search results
Product: [Plasma] krunner Reporter: S <sb56637>
Component: generalAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED DUPLICATE    
Severity: wishlist CC: nate
Priority: NOR Keywords: usability
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Search for "screen" in start menu. "Spectacle" should be first.
Search for "screen" in Krunner. "Spectacle" should be first.

Description S 2018-10-15 13:06:23 UTC
Hi, this report is on openSUSE Tumbleweed with Plasma 5.14.0, KDE Frameworks 5.50.0, and Qt 5.11.2.

I find the "intelligence" feature of the Plasma start menu and Krunner to be highly useful, but I think it could be improved. It appears to be giving priority to System Settings modules over regular applications. And in any case, it doesn't seem to give much weight/importance to the amount of times that a given application has been launched. For example, I use Spectacle constantly for screenshots, and yet, when I type "screen", it always puts the "Screen Edges" settings module in first place, despite the fact that I have maybe launched Screen Edges two times at most during the life of this system. I'm attaching a screenshot of this. Spectacle was even farther down in the list, and it appeared that it wasn't taking the amount of launches into account at all until I artificially launched Spectacle about 10 times in a row, at which point it moved up. 

This issue isn't exclusive to "screen" and Spectacle, as I frequently find that the Search system doesn't prioritize my most frequently used items, but this is one easy example.

Thanks a lot!
Comment 1 S 2018-10-15 13:07:10 UTC
Created attachment 115658 [details]
Search for "screen" in start menu. "Spectacle" should be first.
Comment 2 S 2018-10-15 13:07:29 UTC
Created attachment 115659 [details]
Search for "screen" in Krunner. "Spectacle" should be first.
Comment 3 Nate Graham 2018-10-17 15:00:34 UTC
The problem is that there's really no way to know which one should be preferred Why should apps have a higher priority than system settings pages when there is an exact match in the title?

What macOS does in this case is allows the plugins/search results to be sorted via their System Settings KCM equivalent. So you can put Apps always on top if there is an app result and a System Settings result. We should probably do the same here.
Comment 4 Nate Graham 2018-10-17 15:01:16 UTC

*** This bug has been marked as a duplicate of bug 359627 ***
Comment 5 S 2018-10-17 15:17:55 UTC
Thanks a lot for the reply. 

I wonder if frequency of usage could be given higher priority than the source of the app/setting/file. Because I also sometimes have folders or files that I open more frequently than anything else, and their names and/or contents also sometimes coincide with application or settings names. For example, if I have a "Screenshots" folder that I open 20 times a day, I would expect it to be the first result if I only open Spectacle or Screen Settings 5 times a day.
Comment 6 Kai Uwe Broulik 2018-10-17 15:22:12 UTC
KRunner has a not very sophisticated way of prioritizing results that have been invoked previously. Note the LaunchCounts in ~/.config/krunnerrc

I'm not sure that works properly in Plasma 5, as Milou (the backend for Plasma 5's runner) does some sorting/grouping on its own.