Bug 511554

Summary: Application Launcher search mismatches the words
Product: [Plasma] plasmashell Reporter: redford <redford>
Component: Application Launcher (Kickoff) widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: akselmo, mikel5764, nate, noahadvs
Priority: NOR    
Version First Reported In: 6.5.1   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot of the menu misfindings of "sleep"
Screenshot of the menu misfindings of "log out"
Screenshot of Plasma Search settings

Description redford 2025-11-03 01:24:44 UTC
Created attachment 186446 [details]
Screenshot of the menu misfindings of "sleep"

SUMMARY

Since a recent update (6.4.5 -> 6.5.1) my Application Launcher started to get flaky when searching. An example below.

STEPS TO REPRODUCE
1. Press [Win] to open the Application Launcher
2. Type "sleep", in order to suspend my computer.

OBSERVED RESULT

The list of actions I get is: (in this very order)
- Sweeper
- KMines
- [a few files from my drive containing "sleep" in their name]
- Sleep

I need to press [Down] multiple times to get to the Sleep action.

EXPECTED RESULT

"Sleep" action should be the top result after searching for "sleep", not "Sweeper" (?? how did this even happen? :) )

SOFTWARE/OS VERSIONS
Linux: Arch Linux, kernel 6.17.5-arch1-1
KDE Plasma Version: 6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0

ADDITIONAL INFORMATION

This was working as expected before the update.
Comment 1 Akseli Lahtinen 2025-11-03 10:36:26 UTC
If you want it to be above others, you will have to change "Power" plugin order in Plasma Search settings to top of the others.
Comment 2 redford 2025-11-03 11:44:13 UTC
(In reply to Akseli Lahtinen from comment #1)
> If you want it to be above others, you will have to change "Power" plugin
> order in Plasma Search settings to top of the others.

But my problem is that entries which don't match my query are shown above the ones which do.
"Sweeper" is matched higher than "Sleep" when searching for "sleep" - isn't this a bug? Moreover, it worked correctly before the update, it's some recent change which introduced that.
Comment 3 Akseli Lahtinen 2025-11-03 12:23:33 UTC
I'll reopen this, now I'm not sure either what is the expected behavior.
Comment 4 redford 2025-11-03 12:30:41 UTC
Thanks!

I tried a bit more and it seems that the _category_ of an item takes precedence over the match score since the most recent update. Apps are always shown higher on the list, even if the match is very far fetched.

Another example, for "log out", the suggestions are: (in this order)
1. KolourPaint
2. KmPlot
3. KTnef
4. Log Out
5. Desktop Session

Screenshot attached.
Comment 5 redford 2025-11-03 12:31:44 UTC
Created attachment 186459 [details]
Screenshot of the menu misfindings of "log out"
Comment 6 Nate Graham 2025-12-08 17:37:31 UTC
Akseli has the right idea. KRunner plugins have an order to them. You can manually specify that certain plugins are "favorites" and they appear above all others. By default, the Power and Session plugins are listed first, before Applications. It's done that way for a reason; to precisely this bug you're experiencing doesn't happen. :) 

Can you attach a screenshot of the "Plasma Search" page in System Settings? I'm willing to bet that you don't have the Power and Session plugins listed first.
Comment 7 redford 2025-12-10 13:36:24 UTC
Indeed, seems that "Applications" is the only entry in favorites (see the screenshot). But... I've never changed that setting. It's just a recent update after which the search stopped to work as expected, it didn't start with me reconfiguring something in Plasma.
Should I reset this to defaults? Why did it change during the update?
Comment 8 redford 2025-12-10 13:37:18 UTC
Created attachment 187492 [details]
Screenshot of Plasma Search settings
Comment 9 Nate Graham 2025-12-10 19:53:14 UTC
Yep, that's the problem. You've got it set up so that results from the Applications plugin are always first. So even a perfect match from another plugin will be lower down then any matches from the Applications plugin.

If you don't want this to be the case, remove it from Favorites, or put the Power/Session plugins in Favorites too, and move them higher up.

What's most likely the cause of this change was that the Applications plugin does fuzzy matching now, meaning it returns results a lot more often than it used to. That was an intentional change, though.
Comment 10 redford 2025-12-22 12:14:13 UTC
(In reply to Nate Graham from comment #9)
> Yep, that's the problem. You've got it set up so that results from the
> Applications plugin are always first. So even a perfect match from another
> plugin will be lower down then any matches from the Applications plugin.
> 
> If you don't want this to be the case, remove it from Favorites, or put the
> Power/Session plugins in Favorites too, and move them higher up.

Done, now it works as expected! Thanks!

> What's most likely the cause of this change was that the Applications plugin
> does fuzzy matching now, meaning it returns results a lot more often than it
> used to. That was an intentional change, though.

Ah, so the "Applications" category was always in the favorites, it's just the search which wasn't fuzzy in the past?
Comment 11 Nate Graham 2025-12-22 21:59:11 UTC
That's correct!