Bug 413988

Summary: Search is case-sensitive what makes sarching incomplete.
Product: [Applications] Discover Reporter: k2mil
Component: discoverAssignee: Dan Leinir Turthra Jensen <leinir>
Status: RESOLVED UPSTREAM    
Severity: wishlist CC: aleixpol, nate
Priority: NOR    
Version First Reported In: 5.16.5   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description k2mil 2019-11-09 21:13:17 UTC
SUMMARY
Discover search are case-sensitive. In example searching qtdmm returns empty list. Searching QtDMM returns application.

STEPS TO REPRODUCE
1. Like in summary.
2. 
3. 

OBSERVED RESULT
Search is case-sensitive.

EXPECTED RESULT
Search should be case-insensitive and substring aware.
Searching in app descriptions should be available too.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora 31
(available in About System)
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.61.0
Qt Version: 5.12.5

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2019-11-12 19:29:08 UTC
Yeah, this is because PackageKit itself performs only case-sensitive searches.

Aleix, is there anything we can do here in Discover, or do we need PackageKit changes to fully fix this?
Comment 2 k2mil 2019-11-19 16:21:10 UTC
Is then any workaround?
Maybe Discover should generate more than one searches in most common combinations of uppercase and lowercase.

In example like:
search text:
“abcdef”

searches for:
Abcdef
ABCDEF
aBCDEF

and returns combined list with removed duplicates?
Comment 3 Nate Graham 2019-11-19 17:02:37 UTC
That's theoretically possible, but each search operation on the backend is not super lightweight, so for a large search term this would result in many operations and it could significantly increase the time that it takes to perform a search.
Comment 4 Nate Graham 2019-11-19 17:23:12 UTC
I consulted with some folks and discovered that whether searches are case-sensitive or case-insensitive depends on the PackageKit backend for the distro itself. The apt backend for Debian and Ubuntu-absed distros is case-insensitive, but the backends for openSUSE- and Arch-based distros are case-sensitive.

I have filed upstream bugs to track fixing these issues:
- https://github.com/hughsie/PackageKit/issues/354 (openSUSE)
- https://github.com/hughsie/PackageKit/issues/355 (Arch)