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. You can also use the search builder to graphically select the criteria, which is then converted into the query language when the search builder is closed.
The query language lets you 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 lets you specify the relationship and order in which the criteria are considered using logical operators, parentheses and quotation marks.
Keyword searches
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 fields contain both keywords, as
governed by your access control
permissions. The keywords may be in
different fields or the same fields.
Keywords will also match some basic synonyms, so a search for property
might
additionally find a bug containing the word properties
. Searches will
otherwise only match full word tokens, rather than treating the query as a
substring.
Most special characters are stripped from keywords before performing the search.
For example, a query like my-query_text
would be split into the tokens
my
and query_text
and return bugs matching both tokens.
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 pair searches
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
.
Any unrecognized field will be interpreted as a keyword search.
Note that for time and count fields, you can use other relational symbols besides the colon character. See Relational operators.
Special value searches using any and none
Optional fields may be queried with the special values any
and none
. any
matches any non-null value. none
matches null values. For a list of all
supported field labels in the search query language, see the
Search Query Reference.
Logical operators
Logical operators allow you to specify more than one criteria and to indicate
the relationship between them. 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 | star: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 contains a quoted phrase (words in the quote appear in the same order) | 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
andNOT
.The
NOT
operator has the same meaning whether it precedes the field name or field value. This means that-assignee:jim
andassignee:-jim
are equivalent.Use parentheses to clearly group terms in the search query. By default, Issue Tracker associates
NOT
with the term immediately following it only and groupsOR
with the two terms that bracket it. For example, the search querytitle:(a OR b NOT c AND d)
is equivalent totitle:((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
orassignee:-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 whitespace. This means that if an issue has the word
state-of-the-art
in its title and you execute the search querytitle:(of art state the)
ortitle:("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 or 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 or 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 in searches are interpreted
as UTC, even if you have a different time zone selected in your
date and time settings.
You can provide the level of specificity 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, the operator must be the colon character
(:
) like created:5d
. 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
.
"Today" searches with day arithmetic
You can use the today
token in time searches as a substitute for the current
date. It supports the use of day arithmetic like today+10
and today-2
. The
today
token can be also be used with time ranges like today-2..today+3
.
Using the today
token in saved searches helps make the query reusable.
Examples:
created:today
modified<=today-10
nearestslo:today+10
resolved:2024-02-29..today+2
customfield1002:today..today+5
Caveat: As mentioned in absolute time format, time
searches in Issue Tracker are in UTC. The same applies to searches that use
today
.