Bug 431609 - Multi-word substring matches are weighted higher than single-word substring matches
Summary: Multi-word substring matches are weighted higher than single-word substring m...
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-01-14 20:39 UTC by Nate Graham
Modified: 2021-02-04 10:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.21.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2021-01-14 20:39:46 UTC
Everything KDE from git master.

If I search for "disco" in KRunner or Kickoff, the top entry is "Display Configuration", instead of either "Discover" or "Discord", which is what I would expect.
Comment 1 Alexander Lohnau 2021-01-14 21:42:32 UTC
Appears to be an issue with https://invent.kde.org/plasma/plasma-workspace/-/commit/9f2abd0a54d51d9234a5a9489d1342b261429fa3, at least this is the last relevant commit.

Does deleting the PlasmaRunnerManager group in ~/.local/share/krunnerstaterc make a difference? (of course do not delete the [History] subgroup and make sure to restart KRunner :))
Comment 2 Nate Graham 2021-01-15 15:35:04 UTC
Yes, that fixes the issue.
Comment 3 Bug Janitor Service 2021-02-01 15:12:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/krunner/-/merge_requests/55
Comment 4 Bug Janitor Service 2021-02-03 12:20:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/629
Comment 5 Harald Sitter 2021-02-04 10:20:07 UTC
Git commit dc65943e0ad3e393e838b511e4c2925206861a2e by Harald Sitter.
Committed on 04/02/2021 at 10:19.
Pushed by sitter into branch 'master'.

Revert "Use subseq matching for service runner"

This reverts commit 9f2abd0a54d51d9234a5a9489d1342b261429fa3.

Scores are adjusted by launch count, so pulling more matches into a
context increases the chance of one of them outscoring the other even
though they have nothing to do with it.

Notable example:
Flatpaks have extremely long Exec lines meaning they match just about
any subsequence match once we've reached 3 query characters.
So then a konversation flatpak matches the query 'tel' same as telegram.
Now if you are more into IRC than into telegram you may have a higher
launch count applying to konversation and all of a sudden the
objectively better match for the query is no longer at the top.

In lieu of a way to prevent this from happening with krunner 5.78 we'll
need to undo the subsequencing for now.

For future reference: Kai and I believe Exec and Comment shouldn't be
subsequence matched at all because Exec just makes no sense to begin
with and Comment can be so very long so it will suffer the same problem
as outlined. The more text there is the higher the chance of it matching
the subsequence simply having having all the characters appear anywhere.

Further future reference: subseq needs a test case added to the unit
test if it makes a return!
Related: bug 432339, bug 262837
FIXED-IN: 5.21.0

M  +5    -5    runners/services/servicerunner.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/dc65943e0ad3e393e838b511e4c2925206861a2e
Comment 6 Harald Sitter 2021-02-04 10:20:33 UTC
Git commit 2e01a2519692c0d67cc279b65b9d12f42c870ae6 by Harald Sitter.
Committed on 04/02/2021 at 10:20.
Pushed by sitter into branch 'Plasma/5.21'.

Revert "Use subseq matching for service runner"

This reverts commit 9f2abd0a54d51d9234a5a9489d1342b261429fa3.

Scores are adjusted by launch count, so pulling more matches into a
context increases the chance of one of them outscoring the other even
though they have nothing to do with it.

Notable example:
Flatpaks have extremely long Exec lines meaning they match just about
any subsequence match once we've reached 3 query characters.
So then a konversation flatpak matches the query 'tel' same as telegram.
Now if you are more into IRC than into telegram you may have a higher
launch count applying to konversation and all of a sudden the
objectively better match for the query is no longer at the top.

In lieu of a way to prevent this from happening with krunner 5.78 we'll
need to undo the subsequencing for now.

For future reference: Kai and I believe Exec and Comment shouldn't be
subsequence matched at all because Exec just makes no sense to begin
with and Comment can be so very long so it will suffer the same problem
as outlined. The more text there is the higher the chance of it matching
the subsequence simply having having all the characters appear anywhere.

Further future reference: subseq needs a test case added to the unit
test if it makes a return!
Related: bug 432339, bug 262837
FIXED-IN: 5.21.0


(cherry picked from commit dc65943e0ad3e393e838b511e4c2925206861a2e)

M  +5    -5    runners/services/servicerunner.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/2e01a2519692c0d67cc279b65b9d12f42c870ae6