After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 694960 - Improve search results
Improve search results
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-01 21:37 UTC by Florian Müllner
Modified: 2013-03-01 23:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
search-provider: Concatenate search terms with AND (2.71 KB, patch)
2013-03-01 21:37 UTC, Florian Müllner
committed Details | Review
window: Split search into words (1.55 KB, patch)
2013-03-01 21:37 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2013-03-01 21:37:36 UTC
In its current state, a search in the shell provides a different set of results than a search in the application, and neither one matches the encouraged search pattern (split by words, require each word to match, ... - TL;DR: do what shell does).
Adjust both searches to follow this pattern.
Comment 1 Florian Müllner 2013-03-01 21:37:39 UTC
Created attachment 237746 [details] [review]
search-provider: Concatenate search terms with AND

Currently the provider will match all panels that match at least
one search term. This differs from the search pattern we use in
GNOME Shell and other GNOME applications, where a result has to
match all search terms. The latter allows users to narrow down
search results by adding additional terms, which is generally
more useful than potentially adding additional results.
Comment 2 Florian Müllner 2013-03-01 21:37:43 UTC
Created attachment 237747 [details] [review]
window: Split search into words

Rather than using the search entry text as a single term when filtering
panels, split the text into multiple terms and concatenate the results,
which is consistent with the search provider and the encouraged search
pattern for GNOME applications.
Comment 3 Bastien Nocera 2013-03-01 22:38:21 UTC
Review of attachment 237746 [details] [review]:

Looks good.
Comment 4 Bastien Nocera 2013-03-01 22:41:15 UTC
Review of attachment 237747 [details] [review]:

concatenate? Looks like subtract/refine to me.
Code looks good.
Comment 5 Florian Müllner 2013-03-01 22:49:46 UTC
(In reply to comment #4)
> concatenate? Looks like subtract/refine to me.
> Code looks good.

What I mean: interpret a search for "foo bar baz" as "foo" AND "bar" AND "baz" (note how concatenation refers to search terms rather than results). Maybe something like "search-provider: Require all terms to match instead of any"?
Comment 6 Florian Müllner 2013-03-01 23:04:17 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > concatenate? Looks like subtract/refine to me.
> > Code looks good.
> 
> What I mean: interpret a search for "foo bar baz" as "foo" AND "bar" AND "baz"
> (note how concatenation refers to search terms rather than results).

Oh, scratch that - sorry, it's late :-)
Comment 7 Florian Müllner 2013-03-01 23:11:35 UTC
Attachment 237746 [details] pushed as 4d01f6b - search-provider: Concatenate search terms with AND
Attachment 237747 [details] pushed as ddba390 - window: Split search into words

Pushed to master - is this something we want on 3-8 as well?
Comment 8 Bastien Nocera 2013-03-01 23:13:20 UTC
(In reply to comment #7)
> Attachment 237746 [details] pushed as 4d01f6b - search-provider: Concatenate search terms
> with AND
> Attachment 237747 [details] pushed as ddba390 - window: Split search into words
> 
> Pushed to master - is this something we want on 3-8 as well?

Yes please
Comment 9 Florian Müllner 2013-03-01 23:16:22 UTC
Pushed to gnome-3-8 as well, thanks!