GNOME Bugzilla – Bug 711640
gdesktopappinfo: Rank Keywords matches higher than GenericName
Last modified: 2013-11-14 15:47:56 UTC
See patch.
Created attachment 259230 [details] [review] gdesktopappinfo: Rank Keywords matches higher than GenericName It makes sense to match on GenericName in case an application does not provide any keywords, but the Keywords field has been added to explicitly support the search case, while GenericName was used to be displayed in menus, so it makes more sense to consider Keywords more (or equally) relevant for search.
I'm kind of dubious about having something as design-sensitive as search hardcoded inside GLib...but eh, we'll see what happens.
Review of attachment 259230 [details] [review]: Colin makes a good point. Can you please add a comment to the public API doc to the effect of "the algorithm for determining matches is undefined and subject to change at any time"?
(In reply to comment #3) > Review of attachment 259230 [details] [review]: > > Colin makes a good point. Can you please add a comment to the public API doc > to the effect of "the algorithm for determining matches is undefined and > subject to change at any time"? I haven't looked at the search code at all, but would it make sense to add a GAppCompareFunc to the API or something, and passing NULL gives you an unspecified default?
We had this at one point -- the way that it worked was sorting the sublists and leaving the toplevel list alone (ie: could be used to change the ranking within categories but not across them). We took it out in favour of just returning the list-of-lists because you can easily sort that for yourself when you're done, in whatever way you like.
Created attachment 259290 [details] [review] gdesktopappinfo: Rank Keywords matches higher than GenericName It makes sense to match on GenericName in case an application does not provide any keywords, but the Keywords field has been added to explicitly support the search case, while GenericName was used to be displayed in menus, so it makes more sense to consider Keywords more (or equally) relevant for search.
Review of attachment 259290 [details] [review]: OK. Thanks.
Attachment 259290 [details] pushed as 2fb8901 - gdesktopappinfo: Rank Keywords matches higher than GenericName Ack'ed on IRC.