STEPS TO REPRODUCE 1. Run `appstreamcli search iso | grep -i popsicle` in a terminal window to make sure Popsicle is available and AppStream sees it 2. Launch Discover with only its PackageKit and Flatpak backends by running `plasma-discover --backends flatpak,packagekit` in a terminal window 3. Search for "iso" OBSERVED RESULT Popsicle isn't in the search results EXPECTED RESULT Popsicle is in the search results SOFTWARE/OS VERSIONS Operating System: Fedora Linux 37 KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.106.0 AppStream version: 0.16.1 Qt Version: 5.15.9 Kernel Version: 6.2.12-200.fc37.x86_64 (64-bit) Graphics Platform: Wayland
Git commit 786243247a9b661c3fdc910df5cc8d5250267f1e by Marco Martin. Committed on 03/11/2023 at 16:51. Pushed by mart into branch 'master'. Relevance sorting heuristics for search Search also in appstreamId(): weird but only way to make gimp come up when searching for gimp, there is also appstream searchTokens but they are abused and lead to a lot of garbage results. Do a new sortRole default when there is a search. This relevance role combines: * rating * a measure based on The Levenshtein distance between search string and app name * an exact match with the name or a sub-word of the name It makes sortings much more "expected" than any of the other sortings. Related: bug 399502, bug 475844 FIXED-IN: 6.0 ![image](/uploads/05fae0a2b90bebb70f3aa6da78e04c4e/image.png) M +26 -2 discover/qml/ApplicationsListPage.qml M +6 -2 libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp M +87 -38 libdiscover/resources/ResourcesProxyModel.cpp M +2 -10 libdiscover/resources/ResourcesProxyModel.h https://invent.kde.org/plasma/discover/-/commit/786243247a9b661c3fdc910df5cc8d5250267f1e