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 509607 - Make Search support logical operators besides 'And'
Make Search support logical operators besides 'And'
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jamie McCracken
Jamie McCracken
Depends on:
Blocks:
 
 
Reported: 2008-01-15 11:41 UTC by Carlos Garnacho
Modified: 2008-04-10 12:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (58.62 KB, patch)
2008-01-15 11:42 UTC, Carlos Garnacho
none Details | Review

Description Carlos Garnacho 2008-01-15 11:41:56 UTC
Right now you can only enter some terms in the entry, and trackerd search these terms applying the "And" logical operator.

I'm going to attach a patch that allows entering search terms like "foo and bar or baz". It's implemented by an expression tree, which will construct a query tree by parsing the string with search term and "and/or" logical operators (with the "And" operator taking precedence on the "Or" one). This query tree will be used later to compose the results in a single search hits list.

In the patch, this is implemented in tracker-query-tree.[ch], which replaces all the SearchQuery logic.

The only think missing, but I think should be safe to do, is to mark these logical operators as translatable, so people can search naturally in their own language
Comment 1 Carlos Garnacho 2008-01-15 11:42:47 UTC
Created attachment 102892 [details] [review]
patch

The patch is fairly big, please tell me if it needs splitting for better review.
Comment 2 Carlos Garnacho 2008-04-10 12:57:16 UTC
An up-to-date with trunk version of this patch has been committed. Thanks Jamie!