SUMMARY After updating Plasma to 6.5.0, the order of results in Krunner has changed for worse. For example, when typing “code”, the first result is “Discover”, while “Visual Studio Code” is second. After years of being able to just type “code” and press Enter to launch VS Code, now I launch Discover instead. Before the 6.5.0 update, VS Code was (in my opinion correctly) first in the list. The same happens when searching for “gimp” – “LibreOffice Impress” comes up before GIMP itself. “GIMP” is the first value in the Keywords property in GIMP’s .desktop file. When do `grep -i gimp libreoffice-impress.desktop`, there are no matches at all. STEPS TO REPRODUCE 1. Update Plasma to 6.5.0. 2. Have both Discover and VS Code installed. 3. Open Krunner and search for “code”. OBSERVED RESULT Discover comes up as the first search result. EXPECTED RESULT VS Code should come up before Discover. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux, kernel 6.17.4-zen2-1-zen KDE Plasma Version: 6.5.0 KDE Frameworks Version: 6.19.0 Qt Version: 6.10.0
It's true, some example I could reproduce this with in 6.5.0 and 6.6 dev (git-master) - “gimp” – “LibreOffice Impress” before GIMP - "notific" brings KCalc (I guess matching "scientific" from its GenericName) before Notifications Seems there is some fuzzy search algo at play here but it doesn't particularly sort results that meaningfully. It should prioritize exact matches in application title (Name value in the desktop file) first.
*** Bug 511143 has been marked as a duplicate of this bug. ***
Created attachment 186210 [details] Search results for "term" The fuzzy searching is quite horrific in my case where I have *many* applications installed (due to having the `kde-applications-meta` package among others), so the search results in some cases end up being almost comical. For example, this is what I get if I type "cmd" with 6.5.0 (which in 6.4.5 just brings up Konsole since its .desktop file has "cmd" as a keyword, and none of these other apps have those three letters in that order anywhere in their respective names, descriptions or .desktop files): - Picmi (Logic Game, from KDE) - Visual Studio Code (VSCode, I made this .desktop file using KMenuEdit) - KSpaceDuel (Space Arcade Game, from KDE) - CMake (Cross-platform buildsystem, part of the `cmake` package on Arch Linux) - Qrca (Barcode Scanner, from KDE) - Bomber (Arcade Bombing Game, from KDE) - Kate (Advanced Text Editor, from KDE) - KAppTemplate (App Code Template Generator, from KDE) - Audex (CDDA Ripping, from KDE) - Konsole (the actual result I want, so far down KRunner doesn't even show it in the list lmao) Searching for "ter" or even "term" to get Konsole is even worse, I actually have to either scroll or make Kickoff/the application launcher taller to find Konsole, with these apps coming up for "term" (see the attached screenshot for proof): - Steam - System Monitor - Welcome Center - System Settings - Info Center - ghostwriter - Help Center - KSystemLog - KAppTemplate - PIM Data Exporter - ISO Image Writer - LibreOffice Writer - Konsole (finally!) I've also found a couple of posts/threads online talking about this issue as well: - https://discuss.kde.org/t/toggle-to-disable-fuzzy-search/40925 - https://www.reddit.com/r/kde/comments/1og5xy7/search_priority_is_being_weird_now/
Should be fixed by https://invent.kde.org/plasma/plasma-workspace/-/commit/25ca340b81984c7ab262714357a18a98637cf9b3
It's not fixed with that; I can still reproduce the issue and related variants with that commit on my system. The problem is that "cmd" and "gimp" are keywords which don't appear to be scored highly enough for exact matches.
There are other distinct issues here too; let's not overload the bug report for them.
I don't see how to reconcile 'gimp' vs 'impress' with the requirement that 'code' should match 'visual studio code' rather than 'kate' (which has a keyword 'code'). gimp and code both being perfect keyword matches for their respective input.
There are other cases: teams vs steam https://discuss.kde.org/t/toggle-to-disable-fuzzy-search/40925/11?u=meven
(In reply to Harald Sitter from comment #7) > I don't see how to reconcile 'gimp' vs 'impress' with the requirement that > 'code' should match 'visual studio code' rather than 'kate' (which has a > keyword 'code'). > > gimp and code both being perfect keyword matches for their respective input. Even if both apps have "code" in their keywords, one also has it in the name. That should count for something, too.
I think vscode doesn't have the keyword code. If it had vscode would score higher by virtue of having both entries score. As it stands we have: vscode - partial match on name kate - exact match on keyword impress - partial match on name gimp - exact match on keyword
(In reply to Harald Sitter from comment #10) > vscode > - partial match on name VS Code has exact match on a word in the name (the full name of the entry is „Visual Studio Code“). I think it could work with the following order: exact match of full name > exact match of one or more words in name > exact match in keywords > partial match in name > partial match in keywords.
*** Bug 511314 has been marked as a duplicate of this bug. ***
Maybe it would help if, instead of just a scoring system for correct matches, things with inexact matches get a penalty per mismatching letter? eg LibreOffice IMPpress has no G when searching for Gimp so it gets a -10 score?
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5950
VSCode's upstream .desktop file indeed doesn't have the "code" keyword (https://github.com/microsoft/vscode/blob/main/resources/linux/code.desktop), but after adjusting the .desktop file I have for it to match upstream and patching my system (running Plasma 6.5.1) with https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5950 it now appears above Discover and Kate when searching for "code", and it also fixes the "gimp", "cmd" and "term" cases for me. Searching for "ter", while it doesn't put Konsole on top it does put a bunch of apps which have "ter" in the name above Konsole (like LibreOffice Writer, Info Center, Help Center etc) which I think makes sense at least (certainly better than Steam showing up lol). Searching for "notific" brings up KCalc first, but I suspect that's just because the only "Notifications" thing I have is from System Settings, and that's a different plugin ranked below Applications in the search plugins list in my case so that makes sense to me as well. The only issue I can find with the search results at this point is that if I search for "vsco" I end up with only Discover as the result and VSCode not showing up at all despite the "vscode" keyword, but I'm guessing this is intentional to avoid minor partial keyword matches flooding the results since applications can have lots of keywords, and editing the .desktop file to have the string "VSCode" in the GenericName section is enough to make it appear above Discover so it's a simple enough fix on my end, plus I don't think I've seen anyone complain about searching for "vsco" being broken anyway lol. All in all, I'm quite happy with the search results after that patch, thanks for the hard work!
Git commit e7b91993dfff0214669b7f4f802c5c4ee5b4a30f by Harald Sitter. Committed on 31/10/2025 at 12:33. Pushed by sitter into branch 'master'. servicerunner: aggressively expand scoring system the previous bonus system wasn't producing very good results when perfect matches were involved. so, we now track perfect matches (along with the other properties of a match -- for future use) which allows us to more aggressively outline the base score we expect a good match to have with regards to relative order. at its heart this functions mostly the same. matching produces scorecards, scorecards are aggregated into weightedcards and those are then computed. the main difference is a new perfectMatchScore logic. if a match was perfect (required no substitutions) then we give it serious base line value relative to their weight. only after that we run the previous fuzzy scoring logic relying on bitap and levenshtein scores. the base score makes sure we have accurate ordering of perfect matches while the fuzzy score makes sure matches within the same base score are then sorted according to how fuzzy or distant they are Related: bug 511235, bug 511237 A +19 -0 runners/services/autotests/fixtures/org.gimp.GIMP.desktop M +2 -0 runners/services/autotests/fixtures/org.kde.konsole.desktop A +24 -0 runners/services/autotests/fixtures/org.libreoffice.LibreOffice.impress.desktop M +44 -2 runners/services/autotests/servicerunnertest.cpp M +35 -17 runners/services/servicerunner.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/e7b91993dfff0214669b7f4f802c5c4ee5b4a30f