2 Commits

Author SHA1 Message Date
Fina Wilke
b36e646b54 gdesktopappinfo: Prefer matches that occur earlier in the match string
Some apps names or keywords contain multiple words. For example 'LibreOffice
Calc' contains the word 'Calc'. This is rightfully detected as a prefix match,
however generally it is expected that searching for 'calc' would consistantly
return 'Calculator' in first position, instead of ranking them equally.

We now prioritise tokens that would otherwise rank equal based on where they
occur in the string, giving earlier occurences precedence.
2025-05-17 15:43:13 +02:00
Ryan Lortie
6e0bbd8adb appinfo: Add some testcases for searching
https://bugzilla.gnome.org/show_bug.cgi?id=711557
2013-11-07 12:41:27 -05:00