Skip to content

Commit b46b522

Browse files
authored
feat(search-syntax): Add new wildcard ops (#15098)
This PR adds in, and updates the search syntax section covering new wildcard operators that have been added to the syntax. Ticket: EXP-502
1 parent 824786d commit b46b522

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

docs/concepts/search/index.mdx

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ Search is available on several features throughout [sentry.io](https://sentry.io
1212
## Query Syntax
1313

1414
<Alert>
15-
You'll only need to use query syntax if you're using a Sentry [API](/api/). You'll get pre-populated suggestions once you start typing in your search terms when using the search bar anywhere in [Sentry.io](https://sentry.sentry.io/).
15+
You'll only need to use query syntax if you're using a Sentry [API](/api/).
16+
You'll get pre-populated suggestions once you start typing in your search
17+
terms when using the search bar anywhere in
18+
[Sentry.io](https://sentry.sentry.io/).
1619
</Alert>
1720

1821
Search queries are constructed using a `key:value` pattern, with an optional raw search at the end. Each `key:value` pair is a `token` and the optional raw search is itself a single `token`. The `key:value` pair `tokens` are treated as issue or event properties. The optional raw search is treated as a single `token` and searches event titles/messages.
@@ -115,24 +118,48 @@ is:unresolved !user.email:[email protected]
115118

116119
In the example above, the search query returns all Issues that are unresolved _and_ have not affected the user with the email address `[email protected]`.
117120

118-
#### Wildcards
121+
#### Wildcard Character
119122

120-
Search supports the wildcard operator `*` as a placeholder for specific characters and strings.
123+
Search supports the wildcard character `*` as a placeholder for specific characters and strings.
121124

122125
```
123126
browser:"Safari 11*"
124127
```
125128

126129
In the example above, the search query will match on `browser` values like `"Safari 11.0.2"`, `"Safari 11.0.3"`, etc.
127130

128-
You may also combine operators like so:
131+
You may also combine the wildcard character `*` with other operators like so:
129132

130133
```
131134
!message:"*Timeout"
132135
```
133136

134137
In the above example, the search query returns results which do not have message values like `ConnectionTimeout`, `ReadTimeout`, etc.
135138

139+
#### Wildcard Operators
140+
141+
<Alert>
142+
When using these operators, the base wildcard character `*` will be treated as
143+
a literal character and not as a wildcard.
144+
</Alert>
145+
146+
Sentry's API supports the use of the following wildcard operators when making requests to the API.
147+
148+
For ease of use, we recommend using the wildcard `*` character instead of these operators when manually querying the API.
149+
150+
```
151+
# Note: the characters wrapping the operators are `\uf00d`.
152+
153+
# contains, and does not contain
154+
browser:Containschrome, !browser:Containsfire
155+
156+
# starts with, and does not start with
157+
browser:StartsWithchrome, !browser:StartsWithchrome
158+
159+
# ends with, and does not end with
160+
browser:EndsWithchrome, !browser:EndsWithfire
161+
```
162+
136163
## Page Filters
137164

138165
Page filters allow you to narrow down the results shown on a page by selecting specific projects, environments, and date ranges. After you've set your filters, they'll persist as you navigate across pages in Sentry.

0 commit comments

Comments
 (0)