The search query language is the syntax you use to perform [issue searches](https://developers.google.com/issue-tracker/concepts/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](https://developers.google.com/issue-tracker/guides/search-builder) to graphically select
the criteria, which are 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](https://developers.google.com/issue-tracker/concepts/search-query-language#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 criterion 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](https://developers.google.com/issue-tracker/concepts/access-control#components). 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](https://developers.google.com/issue-tracker/concepts/search-query-language#operators). 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 a search criterion 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](https://developers.google.com/issue-tracker/concepts/search-query-language#keywords).

Note that for time and count fields, you can use other relational symbols
besides the colon character. See [Relational operators](https://developers.google.com/issue-tracker/concepts/search-query-language#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](https://developers.google.com/issue-tracker/references/search-query-language-labels).

## Logical operators

Logical operators allow you to specify more than one criterion 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 criterion | `type:(Bug|feature_request)` |
| NOT | - | Matches if the issue does not contain the criterion | `-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` 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 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 criterion `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 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 criterion 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](https://developers.google.com/issue-tracker/guides/set-date-time-formatting).

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](https://developers.google.com/issue-tracker/concepts/saved-searches) helps make the query reusable.

Examples:

- `created:today`
- `modified<=today-10`
- `resolved:2024-02-29..today+2`
- `customfield1002:today..today+5`

Caveat: As mentioned in [absolute time format](https://developers.google.com/issue-tracker/concepts/search-query-language#absolute_time_format), time
searches in Issue Tracker are in UTC. The same applies to searches that use
`today`.