Bug 432845

Summary: Discover doesn't weigh higher keywords appearing in application titles
Product: [Applications] Discover Reporter: Dan Dascalescu <ddascalescu+kde>
Component: discoverAssignee: Dan Leinir Turthra Jensen <leinir>
Status: RESOLVED FIXED    
Severity: major CC: aleixpol, bugseforuns, lostdharma, nate, postix, rozsa26, s_chriscollins, yvan
Priority: NOR Keywords: usability
Version: 5.18.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=407588
https://bugs.kde.org/show_bug.cgi?id=443333
Latest Commit: Version Fixed In: 6.0
Sentry Crash Report:
Attachments: Screencast
5.24

Description Dan Dascalescu 2021-02-12 10:36:35 UTC
Created attachment 135622 [details]
Screencast

SUMMARY
When searching for keywords in Discover, it appears the results are not sorted in a useful manner. For example, if a plasmoid says they're accepting donations in "crypto", that plasmoid may appear higher in the search rankings than a plasmoid named "crypto prices".


STEPS TO REPRODUCE
1. Search for "crypto plasmoid"

OBSERVED RESULT
A ton of themes/styles appear first


EXPECTED RESULT
"Crypto Currency Price P{lasmoid" should appear first, but it appears last. This may make users believe there is no plasmoid for their task.
Comment 1 Nate Graham 2021-02-12 18:12:54 UTC
Confirmed.
Comment 2 Nate Graham 2021-02-22 00:51:20 UTC
*** Bug 433277 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2021-04-07 18:50:45 UTC
*** Bug 425092 has been marked as a duplicate of this bug. ***
Comment 4 Aleix Pol 2022-01-20 12:01:57 UTC
Created attachment 145659 [details]
5.24

This is what it's looking like right now, which is clearly better. This is something that was addressed in the server too as far as I know, which is as it should be too.

There is clearly room for improvement in that the title or rating isn't taken into consideration for the sorting, so it would make sense to keep at it a little longer. I'll reach out to the store.kde.org maintainers and see what they think.
Comment 5 S. Christian Collins 2023-01-08 18:41:24 UTC
My Mom thought she couldn't install Zoom on her system, because she didn't see it in the Discover search results when searching for "zoom". Turns out the Zoom application (Flatpak) shows up 26th of 27 entries returned, buried under the likes of Latte, Pampi, PhotoQt, GPX Viewer, Petri-Foo, etc.

I can confirm this behavior in KDE neon Unsable Edition running Plasma version 5.26.80.
Comment 6 S. Christian Collins 2023-01-08 19:42:29 UTC
Okay, so after further testing, I get different search results based on the Plasma version I'm using, all tested in VirtualBox VMs with a clean OS install and up-to-date software. In each case, I searched for "zoom", hoping to find the Zoom app which exists in both Flatpak (us.zoom.Zoom) and Snap (zoom-client) versions.

KDE neon User Edition, Plasma 5.26.5:
200+ search results
* Zoom Flatpak shows up at 1st position
* Zoom Snap shows up at 29th position

KDE neon Unstable Edition, Plasma 5.26.80:
27 search results
* Zoom Flatpak shows up at 26th position
* Zoom Snap doesn't appear at all, and it would appear snap searching is broken altogether, despite plasma-discover-backend-snap being installed and apparently enabled

Kubuntu 22.04, Plasma 5.24.7, Discover Flatpak backend & Flathub enabled manually:
* Zoom Flatpak shows up at 22nd position
* Zoom Snap shows up at 24th position

So, there would appear to be a regression in the recent Discover build featured in KDE neon Unstable Edition.
Comment 7 Bug Janitor Service 2023-03-15 03:00:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/508
Comment 8 Aleix Pol 2023-04-24 21:00:14 UTC
Git commit 749fa991cc608a99ad06890f1e097c02bd0356b1 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 24/04/2023 at 14:56.
Pushed by apol into branch 'master'.

Improve search infrastructure

Let the ResultsStream provide a search score together as the results get
sent. This way we can have an informed decision when sorting the
resources at the view and merging different sources.

M  +7    -7    discover/AbstractAppsModel.cpp
M  +2    -2    discover/AbstractAppsModel.h
M  +8    -8    discover/DiscoverObject.cpp
M  +2    -2    exporter/DiscoverExporter.cpp
M  +2    -2    exporter/DiscoverExporter.h
M  +1    -1    libdiscover/backends/DummyBackend/DummyBackend.cpp
M  +9    -9    libdiscover/backends/DummyBackend/tests/DummyTest.cpp
M  +29   -24   libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
M  +2    -1    libdiscover/backends/FlatpakBackend/FlatpakBackend.h
M  +4    -4    libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.cpp
M  +4    -2    libdiscover/backends/FlatpakBackend/tests/FlatpakTest.cpp
M  +1    -1    libdiscover/backends/FwupdBackend/FwupdBackend.cpp
M  +4    -2    libdiscover/backends/KNSBackend/KNSBackend.cpp
M  +1    -1    libdiscover/backends/KNSBackend/KNSBackend.h
M  +4    -2    libdiscover/backends/KNSBackend/tests/KNSBackendTest.cpp
M  +39   -16   libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp
M  +2    -0    libdiscover/backends/PackageKitBackend/PackageKitBackend.h
M  +2    -2    libdiscover/backends/SteamOSBackend/SteamOSBackend.cpp
M  +15   -2    libdiscover/resources/AbstractResourcesBackend.cpp
M  +24   -2    libdiscover/resources/AbstractResourcesBackend.h
M  +8    -3    libdiscover/resources/ResourcesModel.cpp
M  +2    -2    libdiscover/resources/ResourcesModel.h
M  +43   -33   libdiscover/resources/ResourcesProxyModel.cpp
M  +10   -5    libdiscover/resources/ResourcesProxyModel.h
M  +3    -3    libdiscover/resources/StandardBackendUpdater.cpp
M  +12   -7    libdiscover/resources/StoredResultsStream.cpp
M  +3    -3    libdiscover/resources/StoredResultsStream.h

https://invent.kde.org/plasma/discover/commit/749fa991cc608a99ad06890f1e097c02bd0356b1