Bug 432845 - Discover doesn't weigh higher keywords appearing in application titles
Summary: Discover doesn't weigh higher keywords appearing in application titles
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.18.5
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
Keywords: usability
: 425092 433277 (view as bug list)
Depends on:
Reported: 2021-02-12 10:36 UTC by Dan Dascalescu
Modified: 2023-04-26 21:02 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0

Screencast (2.41 MB, image/gif)
2021-02-12 10:36 UTC, Dan Dascalescu
5.24 (349.09 KB, image/png)
2022-01-20 12:01 UTC, Aleix Pol

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Dascalescu 2021-02-12 10:36:35 UTC
Created attachment 135622 [details]

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".

1. Search for "crypto plasmoid"

A ton of themes/styles appear first

"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
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]

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