GNOME Bugzilla – Bug 623372
searching should sort matches more sensibly
Last modified: 2011-10-13 15:49:29 UTC
When I search for "Terminal" it gives me "Terminal-Server" before "Terminal". I think it should be the other way around.
It's not really that. The results are effectively in random order. We need to prioritize exact matches over partial matches, and name matches over description matches.
(In reply to comment #1) > It's not really that. The results are effectively in random order. > > We need to prioritize exact matches over partial matches, and name matches over > description matches. Part of this is in bug 610955
sort by usage pattern ? In gnome-do, there seems to be a learning mechanism which display the frequently loaded action for a particular search result first. eg: searching "messenger" displays gnome-phone-manager first, and then pidgin .. If I frequently loads pidgin for the result of "messenger", pidgin will appear first for subsequent searches for "messenger"
*** Bug 656313 has been marked as a duplicate of this bug. ***
It looks like the shell already tracks application usage (see bug 656313, which I opened myself and now marked as duplicate of this one). So I guess implementing this behavior shouldn't be very hard... and will save users a lot of frustration.
It would be nice if gnome-shell would learn what the user types to launch something as well. Right now when I type "f" it gives me Adobe Flash Player first, even when I always launch Firefox.
Frequency is a simple metric that would work here, I think.
Created attachment 198387 [details] [review] app-system: Consider usage frequency in search results Application search results are internally categorized in four sets, multiple and single prefix matches and multiple and single substring matches. Each set is currently sorted alphabetically by application name when concatenating the sets to the final result. Change the last step to sort each set by usage frequency instead, which is more likely to favor the most relevant match than "arbitrary" alphabetic order. (In reply to comment #7) > Frequency is a simple metric that would work here, I think. I agree, but just using frequency over alphabetical order does not make too much of a difference for me; I'll attach some more patches which (at least for me) make results more relevant.
Created attachment 198388 [details] [review] shell-app: Improve prefix matches Currently we use a very strict definition of "prefix", where the search term has to match at the very beginning of the searched criteria (application name, executable name). Use a more liberal definition by including matches where the preceding character is a space (application name) or hyphen (executable name) as well; as many applications use a prefix, this should improve the quality of results. (Canonical examples: - matching "play" treats a match on "Movie Player" the same as any applications which mentions "play" in its description (e.g. every game); with the patch, "Movie Player" is considered a better match - XFCE's Terminal wins over gnome-terminal ("Terminal" matches multiple prefixes, gnome-terminal does not (as the executable is "gnome-terminal")); with the patch, both matches rank equally, which means that with the previous patch, the more frequently used one wins
Created attachment 198389 [details] [review] shell-app: Ignore MATCH_MULTIPLE_{PREFIX,SUFFIX} We originally OR'ed search terms and favored results which matched multiple times to get more relevant results. When changing search to AND search terms, the semantics of "multiple matches" were changed to refer to a single term matching multiple criteria (name, executable), which seemed like a good idea at the time. However in practice this just results in applications whose user-visible name matches the executable name on disk being favored over applications using a more generic name, which isn't too useful (in particular when taking usage frequency into account). Example: - searching for "m" gives me "Mahjongg" (which I've never ever used) as first result, before totem ("Movie Player"), which I do use occasionally;
This sounds like good stuff but it's more 3.4 right? I'm getting a bit worried about the amount of stuff piling up for 3.0.1...
Yeah, probably. I consider it nice-to-have, but we have more important stuff in line for 3.2.1 ...
*** Bug 661136 has been marked as a duplicate of this bug. ***
I don't know how feasible it is to get it in 3.2.1 but it would be a huge improvement. This is one of the most annoying things not working in GNOME 3 at the moment. So I'm all for having it in.
Review of attachment 198387 [details] [review]: This looks good.
Review of attachment 198388 [details] [review]: Looks good.
Review of attachment 198389 [details] [review]: Ok...then why aren't we just removing MATCH_MULTIPLE?
Created attachment 198943 [details] [review] shell-app: Remove MATCH_MULTIPLE_{PREFIX,SUFFIX} (In reply to comment #17) > Ok...then why aren't we just removing MATCH_MULTIPLE? Yeah, makes sense ...
Review of attachment 198943 [details] [review]: Looks good, thanks.
Attachment 198387 [details] pushed as da83ad5 - app-system: Consider usage frequency in search results Attachment 198388 [details] pushed as c427bba - shell-app: Improve prefix matches Attachment 198943 [details] pushed as aee3c6f - shell-app: Remove MATCH_MULTIPLE_{PREFIX,SUFFIX} Thanks for the review!