Bug 431603 - When searching for applications results are not as expected.
Summary: When searching for applications results are not as expected.
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords:
: 433234 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-01-14 18:42 UTC by Connor
Modified: 2022-06-29 20:21 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26


Attachments
krunnerrc file as requested by Alexander Lohnau (790 bytes, text/plain)
2021-01-15 01:27 UTC, Connor
Details
Screenshot of ordering for "php" (84.10 KB, image/png)
2022-05-27 12:47 UTC, David McKenna
Details
Screenshot of ordering for "vir" (76.19 KB, image/png)
2022-05-27 12:49 UTC, David McKenna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Connor 2021-01-14 18:42:00 UTC
SUMMARY
When searching for Konsole after typing "ko" Konsole suggested. When typing "kon" another application is the first result. (In my case Atom Text Editor) Similar behavior is observed when searching for About and other applications. 

STEPS TO REPRODUCE
1. Open Krunner (or kickoff)
2. Search for applications using different amounts of letters
3. Observe results

OBSERVED RESULT
Wrong application suggested when searching with 3 characters

EXPECTED RESULT
Correct application suggested when using any amount of characters (within reason)

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: KDE Neon Unstable
(available in About System)
KDE Plasma Version: 5.20.80
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

* This bug may be filed in the wrong place because the new kickoff replacement has the same issue. *
Comment 1 Nate Graham 2021-01-14 20:23:09 UTC
Does the same thing happen in KRunner itself (activated via Alt+Space or Alt+F2)?
Comment 2 Nate Graham 2021-01-14 20:23:27 UTC
oh lol you already said so. Sorry.
Comment 3 Nate Graham 2021-01-14 20:37:07 UTC
Installed Atom and I cannot reproduce.
Comment 4 Alexander Lohnau 2021-01-14 21:39:13 UTC
I fear this is once again an issue with the RunnerContext relevance logic.

@Connor could you please share your ~/.config/krunnerrc file? (Only if that is okay with you, please check if there is any sensitive information contained). The [PlasmaRunnerManager] group might help reproducing this issue.
Comment 5 Connor 2021-01-15 01:02:33 UTC
I will as soon as Iā€™m back on my computer.

(In reply to Alexander Lohnau from comment #4)
> I fear this is once again an issue with the RunnerContext relevance logic.
> 
> @Connor could you please share your ~/.config/krunnerrc file? (Only if that
> is okay with you, please check if there is any sensitive information
> contained). The [PlasmaRunnerManager] group might help reproducing this
> issue.
Comment 6 Connor 2021-01-15 01:27:04 UTC
Created attachment 134872 [details]
krunnerrc file as requested by Alexander Lohnau
Comment 7 Connor 2021-01-15 01:43:51 UTC
I would also like to note that as of right now I am no longer having this issue with Konsole and Atom, but now when using 3 (or 4) characters to search for Firefox the first suggestion is System Settings.
Comment 8 Justin Zobel 2021-01-15 02:39:51 UTC
There is certainly some odd logic here either way.

I typed in ko and I get Konsole and Konversation under Applications section at the top
If I add the n then Open Windows section gets a higher priority and Applications is bumped down.
Comment 9 Nate Graham 2021-06-04 13:20:56 UTC
*** Bug 433234 has been marked as a duplicate of this bug. ***
Comment 10 Artiom Neganov 2022-01-18 13:44:51 UTC
Hi folks.

I'm having similar issues here on Kubuntu 20.04 with Plasma 5.18.5.

I have two applications installed: "Obsidian" and "OBS Studio".
Now when I type "obs studi", the first suggestion is "Obsidian" and only then goes "OBS Studio". 

https://i.gyazo.com/949f814b4a1992e10a59fb124c55d0c2.png

As you see, both matches come from Applications group.

The only way to get OBS Studio first is to... type its name to the end: "obs studio".

Any ideas on why the search works incorrectly?
Comment 11 GreggB 2022-02-24 14:02:20 UTC
On Manjaro 5.23.5 / 5.90.0 Attempting to get "Display Configuration"

In Kickoff: "dis" gets Filelight; "disp" gets Calendar; "display" gets Run Display. The only way to get Display Configuration as the first result is to type "mo".

In Krunner: "displ" will get Display Configuration to the top of the results.
Comment 12 David McKenna 2022-05-27 12:46:14 UTC
It's super annoying... There should be a way to sort the groups or plugins. For me, I would like applications to be forced to the top. It's acting super strange right now. Being a PHP developer I open PHPStorm and VirtualBox a lot. If I type in "php" I get everything that has to do with php before getting PHPStorm right at the bottom. And if I search "vir" I get VirtualBox right at the top. It makes absolutely no sense and it does not take history into account either considering I open PHPStorm and VirtualBox the most. Especially PHPStorm. I don't think I have opened like 90% of the stuff that's before it. It's just weird that recent files and command line are coming up before the application.
Comment 13 David McKenna 2022-05-27 12:47:48 UTC
Created attachment 149259 [details]
Screenshot of ordering for "php"
Comment 14 David McKenna 2022-05-27 12:49:06 UTC
Created attachment 149260 [details]
Screenshot of ordering for "vir"
Comment 15 Alexander Lohnau 2022-05-27 14:36:02 UTC
>Screenshot of ordering for "php"

A workaround might be to search for "phpstorm" and launch the app. Next time you type "php" it gets autocompleted to "phpstorm".

I will look into a better fix (sorry that I forgot about this bug report=
Comment 16 David McKenna 2022-05-27 18:19:21 UTC
Ok, that's fixed for now. IDK why I didn't think of that. But should still have some way of sorting plugins because I'm sure there are people that always want applications first and then whatever else is there.
Comment 17 Alexander Lohnau 2022-05-28 06:33:33 UTC
>Screenshot of ordering for "php"

I am wondering if we should avoid setting the relevance for recent documents/folders that high, if we have a very short name.
Comment 18 David McKenna 2022-05-28 16:02:46 UTC
I have no clue what percentage of users use recent files over applications there. I would think an overwhelming majority would be using it mainly for applications.
Comment 19 Alexander Lohnau 2022-06-05 17:42:56 UTC
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1779 takes care of this
Comment 20 Alexander Lohnau 2022-06-29 20:17:00 UTC
Git commit 0e3b24c95428a4f70867d33bf5536b0720339f94 by Alexander Lohnau.
Committed on 29/06/2022 at 19:58.
Pushed by alex into branch 'master'.

runners/recentdocuments: Do not set match type to exact match when query is short

M  +2    -2    runners/recentdocuments/recentdocuments.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/0e3b24c95428a4f70867d33bf5536b0720339f94