Bug 416277

Summary: Apps search order broken after recent update.
Product: [Plasma] krunner Reporter: Victor Prudniy <vityas_official>
Component: generalAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED FIXED    
Severity: normal CC: alexander.lohnau, nate, vascom2
Priority: NOR    
Version First Reported In: 5.17.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: demonstration of bug
Seems to work as expected in Kicker (they use the same backend)
Different ordering in KRunner

Description Victor Prudniy 2020-01-15 04:09:25 UTC
Created attachment 125133 [details]
demonstration of bug

I'm used to type 'mon', press enter and start app 'mongo compas', but now first search suggestion is spectacle because it's description contain word 'monitor' and this is definitely not the thing user who typed 'mon' wants. Please see screenshot attachment.

EXPECTED RESULT
Apps which names strictly starts with search queue should be first in results order

SOFTWARE/OS VERSIONS
Arch linux
plasmashell 5.17.5
krunner 5.17.5
baloo indexer disabled
Comment 1 Alexander Lohnau 2020-06-14 17:29:14 UTC
Created attachment 129358 [details]
Seems to work as expected in Kicker (they use the same backend)
Comment 2 Alexander Lohnau 2020-06-14 17:43:22 UTC
Created attachment 129360 [details]
Different ordering in KRunner
Comment 3 Alexander Lohnau 2020-06-14 17:44:58 UTC
The debug output from the services runner:

org.kde.plasma.runner.services: "MongoDB Compass" disqualified? false
org.kde.plasma.runner.services: "MongoDB Compass" is this relevant: 0.9
org.kde.plasma.runner.services: "KMyMoney" disqualified? false
org.kde.plasma.runner.services: found a kde thing "org.kde.kmymoney.desktop" "Personal Finance Manager" 0.8
org.kde.plasma.runner.services: "KMyMoney" is this relevant: 0.89
org.kde.plasma.runner.services: "System Monitor" disqualified? true
org.kde.plasma.runner.services: "Notification Daemon" disqualified? true
org.kde.plasma.runner.services: "Displays" disqualified? true
org.kde.plasma.runner.services: "Displays" disqualified? true
org.kde.plasma.runner.services: "KSysGuard" disqualified? false
org.kde.plasma.runner.services: found a kde thing "org.kde.ksysguard.desktop" "System Monitor" 0.65
org.kde.plasma.runner.services: "KSysGuard" is this relevant: 0.74
org.kde.plasma.runner.services: "Gamma" disqualified? false
org.kde.plasma.runner.services: found a kde thing "kgamma.desktop" "A monitor calibration tool" 0.5
org.kde.plasma.runner.services: "Gamma" is this relevant: 0.59
org.kde.plasma.runner.services: "Display Configuration" disqualified? false
org.kde.plasma.runner.services: found a kde thing "kcm_kscreen.desktop" "Manage and configure monitors and displays" 0.5
org.kde.plasma.runner.services: "Display Configuration" is this relevant: 0.59
org.kde.plasma.runner.services: "File Indexer Monitor" disqualified? false
org.kde.plasma.runner.services: found a kde thing "kcm_fileindexermonitor.desktop" "Monitor State of File Indexer" 0.8
org.kde.plasma.runner.services: "File Indexer Monitor" is this relevant: 0.89
org.kde.plasma.runner.services: "Samba Status" disqualified? false
org.kde.plasma.runner.services: found a kde thing "smbstatus.desktop" "Samba status monitor" 0.5
org.kde.plasma.runner.services: "Samba Status" is this relevant: 0.59

Seems like the order is correctly displayed in kicker, but not in KRunner.

I remember having a similar problem when writing a KRunner plugin for emojis which supports ordering of favorites.
Comment 4 Alexander Lohnau 2020-06-14 21:26:22 UTC
Weird, it seems to be broken on the krunner plugin side of things, even though the debugging output looks fine.
Comment 5 Alexander Lohnau 2020-10-18 19:49:29 UTC
Can you please provide the LaunchCounts entry from the ~/.config/krunnerrc file?

My suspicion is that the mentioned result is ranked higher, because you have already launched it. To verify this please delete the mentioned entry in the krunnerrc file and restart KRunner (kquitapp5 krunner;krunner&) and check if it then works as expected.
Comment 6 Alexander Lohnau 2020-10-30 07:55:07 UTC
Please provide the information requested in my last comment.
Comment 7 Victor Prudniy 2020-10-30 12:29:50 UTC
It's now seems to be fixed, everything showing in correct order. Thanks for feedback.