Search Query Language

The search query language is the syntax you use to perform issue searches in Google Issue Tracker. You can use the language in search queries you enter in the search bar or search editor, or you can use the search builder to graphically select the criteria, which is then converted into the query language when Issue Tracker executes the search.

Language basics

The query language allows you to search by the following criteria:

  • Keywords
  • Field/value pairs

Searches you perform can contain multiple criteria, including a combination of keywords and field/value pairs. The query language syntax allows you to specify the relationship and order in which the criteria are considered using logical operators, parentheses and quotation marks.

Keywords

Keywords are text strings that you can use to search across certain fields in issues. These fields are:

  • Title
  • Comments
  • Names of attachments
  • Fields that contain users (for example, Assignee or CC)
  • Fields that contain an internal ID number (for example, those that specify the component or hotlists that contain an issue)
  • Fields that contain version numbers
  • Custom fields

An example of keyword search criteria is the string configuration properties. When you enter this criteria in a search, Issue Tracker globally searches issues in all components and returns those whose above fields contain both keywords, as governed by your access control permissions. The keywords may be in different fields or the same fields.

Issue Tracker treats the space character separating search criteria as an implicit AND operator. You can use quotation marks (") to specify that a multi-word string is to be considered as a single keyword. All searches in Issue Tracker are case-insensitive, whether or not you use quotation marks.

Field/value pairs

You can also specify search criteria as a field/value pair. The base syntax is [field]:[value]. For text fields, this syntax matches issues where the specified field contains the value. For other types of fields, it matches issues where the field value is equivalent. For example, a search for title:latency matches issues with the word latency in the Title field. A search for priority:p0 finds issues with a priority of p0. For a list of all supported field labels in the search query language, see the Search Query Reference.

Note that for time and count fields, you can use other relational symbols besides the colon character. See Relational operators below.

Logical operators

Logical operators allow you to specify more than one criteria and to indicate the relationship between them. As noted above, space characters outside of quotation marks act as implicit AND operators. Issue Tracker supports the following additional explicit logical operators:

Operator Alternate symbol Description Example
AND {whitespace} Matches if the issue contains both criteria starred:true AND componentid:46046
OR | Matches if the issue contains either criteria type:(Bug|feature_request)
NOT - Matches if the issue does not contain the criteria -assignee:jim
"..." Matches if the issue exactly matches the quoted phrase comment:"We have a problem"
( ) Groups values or search criteria together status:open AND (priority:(p0|p1) OR severity:(s0|s1))

Note the following:

  • You must use all capital letters for AND, OR and NOT.

  • The NOT operator has the same meaning whether it precedes the field name or field value. This means that -assignee:jim and assignee:-jim are equivalent.

  • Use parentheses liberally to clearly group terms in the search query. By default, Issue Tracker associates NOT with the term immediately following it only and groups OR with the two terms that bracket it. For example, the search query title:(a OR b NOT c AND d) is equivalent to title:((a OR b) AND (NOT c) AND d).

Dashes

The dash character (-) has different meanings based on the context in a search query:

  • Issue Tracker treats the dash preceding a word in a search as a NOT operator. For example, the search criteria -assignee:none or assignee:-none returns all issues that have an assignee.

  • Issue Tracker treats strings connected by a dash character as being enclosed by quotation marks. For example, the search criteria state-of-the-art is equivalent to "state of the art".

  • Issue Tracker treats hyphenated words in an issue field as independent words separated by white space. This means that if an issue has the word state-of-the-art in its title and you execute the search query title:(of art state the) or title:("state of the art"), the issue is returned as part of the search results.

Relational operators

The base syntax for a field/value search criteria is [field]:[value], where the colon character (:) specifies that the given field must be equal to or contain the specified value in order for an issue to be returned in the search results.

Fields that contain a time value (created, modified, resolved, verified and certain custom fields) or a count value (duplicatecount, votecount, commentcount and cccount) support the following additional relational operators:

Symbol Description
< Matches an issue if its value is less than/before your search value.
<= Matches an issue if its value is less than/before or equal to your search value.
> Matches an issue if its value is greater than/after your search value.
>= Matches an issue if its value is greater than/after or equal to your search value.

Time searches

The search query language provides a special syntax for matching fields that contain a time value. This allows Issue Tracker to search over a range of times or relative times as required.

Absolute time format

The format for specifying a time is:

[yyyy]-[MM]-[dd]T[HH]:[mm]:[ss].

In this format, [yyyy] is the 4-digit year, [MM] is the 2-digit month, [dd] is the 2-digit day, [HH] is the 2-digit hour of a 24-hour clock, [mm] is the minute, and [ss] is the second. All times are in UTC.

You can provide the level of specificity you wish when searching for issues created at, before or after a certain time. For example, you can specify created:2014-06 to find issues that were created any time in June of 2014. For more specificity, you can search created:2014-06-03T04 to find issues that were created on June 3, 2014 in the 4th hour (between 4 and 5 AM, UTC).

Time ranges

You can use two period characters (..) to specify a time range in field/value search criteria. The syntax is [field]:[start time]..[end time]. The start and end times can have any degree of specificity you require. For example, verified:2013..2015 returns all issues verified in 2013, 2014 or 2015.

Relative time format

You can also specify a time in terms of days prior to today. To do so, use the format [days]d, where [days] is the number of days in the past you want to include in the search results. For example, you can use modified:5d to find issues modified in the past five days.

When using a relative time format, Issue Tracker does not differentiate between relational operators. So, created>5d and created<5d returns the same results as created:5d. This is because the relative time format assumes a range of dates between the time you specify and the present. If you want to find issues that don't fall in the range, you can use the NOT or - operator.

For example, -verified:10d returns issues that have not been verified in the past 10 days. If you want to find issues that have been verified, but not in the past 10 days, you can use (-verified:10d) AND status:verified.