Change Queries and Boolean Operators

76 views
Skip to first unread message

Marc Swingler

unread,
Jun 3, 2024, 9:56:05 PM6/3/24
to Repo and Gerrit Discussion
The documentation for boolean operators is a bit sparse. Anyone have working examples?

for example, the following query:

q=change%3AI0123456789abcdef0123456789abcdef01234567+status%3A%28merged+OR+abandoned%29

returns new CRs in addition to abandoned and merged CRs, which is not the result I was expecting.


AND

The boolean operator AND (in all caps) or and (all lower case) can be used to join two other operators together. This results in a restriction of the results, returning only changes that match both operators.

OR

The boolean operator OR (in all caps) or or (all lower case) can be used to find changes that match either operator. This increases the number of results that are returned, as more changes are considered.

Edwin Kempin

unread,
Jun 4, 2024, 1:25:26 AM6/4/24
to Marc Swingler, Repo and Gerrit Discussion
On Tue, Jun 4, 2024 at 3:56 AM Marc Swingler <marc.s...@gmail.com> wrote:
The documentation for boolean operators is a bit sparse. Anyone have working examples?

for example, the following query:

q=change%3AI0123456789abcdef0123456789abcdef01234567+status%3A%28merged+OR+abandoned%29

Please try "(status:merged OR status:abandoned)" instead of "status:(merged OR abandoned)".
 

returns new CRs in addition to abandoned and merged CRs, which is not the result I was expecting.


AND

The boolean operator AND (in all caps) or and (all lower case) can be used to join two other operators together. This results in a restriction of the results, returning only changes that match both operators.

OR

The boolean operator OR (in all caps) or or (all lower case) can be used to find changes that match either operator. This increases the number of results that are returned, as more changes are considered.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/694a11b9-2d02-4253-ae23-70a6557cf3ebn%40googlegroups.com.

Marc Swingler

unread,
Jun 4, 2024, 4:33:18 PM6/4/24
to Repo and Gerrit Discussion
Thanks Edwin, that worked.
Reply all
Reply to author
Forward
0 new messages