1# Search filters
2
3When performing a search (e.g. listing issues), you can use different qualifiers
4to narrow the results. This page provides an overview of these filters, and how
5to use them.
6
7<!-- mdformat-toc start --slug=github --maxlevel=4 --minlevel=2 -->
8
9- [Overview](#overview)
10- [Filtering](#filtering)
11 - [Filtering by status](#filtering-by-status)
12 - [Filtering by author](#filtering-by-author)
13 - [Filtering by participant](#filtering-by-participant)
14 - [Filtering by actor](#filtering-by-actor)
15 - [Filtering by label](#filtering-by-label)
16 - [Filtering by title](#filtering-by-title)
17 - [Filtering by missing feature](#filtering-by-missing-feature)
18- [Sorting](#sorting)
19 - [Sort by Id](#sort-by-id)
20 - [Sort by Creation time](#sort-by-creation-time)
21 - [Sort by Edit time](#sort-by-edit-time)
22
23<!-- mdformat-toc end -->
24
25## Overview<a name="overview"></a>
26
27The query filters in `git-bug` have a familiar look and feel:
28
29```
30status:open sort:edit
31```
32
33**Key things to know**
34
35- All queries are case insensitive
36- You can combine as many qualifiers as you want
37- If you have a space in your qualifier, be sure to wrap it in double quotes. As
38 an example, `author:"René Descartes"` would filter for issues opened by
39 `René Descartes`, whereas `author:René Descartes` filter for `René` as the
40 author and return issues that contain `Descartes` somewhere in the title,
41 description, or comments.
42- Instead of a complete ID, you can use any prefix length, as long as it is long
43 enough to be unique (similar to git commit hashes). For example,
44 `participant=9ed1a` would match against participants with an ID of
45 `9ed1af428...` and `9ed1ae24a...`
46
47## Filtering<a name="filtering"></a>
48
49### Filtering by status<a name="filtering-by-status"></a>
50
51You can filter bugs based on their status.
52
53| Qualifier | Example |
54| --------------- | ----------------------------------- |
55| `status:open` | `status:open` matches open bugs |
56| `status:closed` | `status:closed` matches closed bugs |
57
58### Filtering by author<a name="filtering-by-author"></a>
59
60You can filter based on the person who opened the bug.
61
62| Qualifier | Example |
63| -------------- | -------------------------------------------------------------------------------- |
64| `author:QUERY` | `author:descartes` matches bugs opened by `René Descartes` or `Robert Descartes` |
65| | `author:"rené descartes"` matches bugs opened by `René Descartes` |
66
67### Filtering by participant<a name="filtering-by-participant"></a>
68
69You can filter based on the person who participated in any activity related to
70the bug (opened bug or added a comment).
71
72| Qualifier | Example |
73| ------------------- | -------------------------------------------------------------------------------------------------- |
74| `participant:QUERY` | `participant:descartes` matches bugs opened or commented by `René Descartes` or `Robert Descartes` |
75| | `participant:"rené descartes"` matches bugs opened or commented by `René Descartes` |
76
77### Filtering by actor<a name="filtering-by-actor"></a>
78
79You can filter based on the person who interacted with the bug.
80
81| Qualifier | Example |
82| ------------- | ------------------------------------------------------------------------------- |
83| `actor:QUERY` | `actor:descartes` matches bugs edited by `René Descartes` or `Robert Descartes` |
84| | `actor:"rené descartes"` matches bugs edited by `René Descartes` |
85
86> [!NOTE]
87> Interactions with issues include opening the bug, adding comments, adding or
88> removing labels, etc.
89
90### Filtering by label<a name="filtering-by-label"></a>
91
92You can filter based on the bug's label.
93
94| Qualifier | Example |
95| ------------- | ------------------------------------------------------------------------- |
96| `label:LABEL` | `label:prod` matches bugs with the label `prod` |
97| | `label:"Good first issue"` matches bugs with the label `Good first issue` |
98
99### Filtering by title<a name="filtering-by-title"></a>
100
101You can filter based on the bug's title.
102
103| Qualifier | Example |
104| ------------- | ------------------------------------------------------------------------------ |
105| `title:TITLE` | `title:Critical` matches bugs with a title containing `Critical` |
106| | `title:"Typo in string"` matches bugs with a title containing `Typo in string` |
107
108### Filtering by missing feature<a name="filtering-by-missing-feature"></a>
109
110You can filter bugs based on the absence of something.
111
112| Qualifier | Example |
113| ---------- | -------------------------------------- |
114| `no:label` | `no:label` matches bugs with no labels |
115
116## Sorting<a name="sorting"></a>
117
118You can sort results by adding a `sort:` qualifier to your query. “Descending”
119means most recent time or largest ID first, whereas “Ascending” means oldest
120time or smallest ID first.
121
122Note: to deal with differently-set clocks on distributed computers, `git-bug`
123uses a logical clock internally rather than timestamps to order bug changes over
124time. That means that the timestamps recorded might not match the returned
125ordering. To learn more, we encourage you to read about why
126[time is unreliable][docs/design/model].
127
128### Sort by Id<a name="sort-by-id"></a>
129
130| Qualifier | Example |
131| -------------------------- | ----------------------------------------------------- |
132| `sort:id-desc` | `sort:id-desc` will sort bugs by their descending Ids |
133| `sort:id` or `sort:id-asc` | `sort:id` will sort bugs by their ascending Ids |
134
135### Sort by Creation time<a name="sort-by-creation-time"></a>
136
137You can sort bugs by their creation time.
138
139| Qualifier | Example |
140| --------------------------------------- | ------------------------------------------------------------------- |
141| `sort:creation` or `sort:creation-desc` | `sort:creation` will sort bugs by their descending creation time |
142| `sort:creation-asc` | `sort:creation-asc` will sort bugs by their ascending creation time |
143
144### Sort by Edit time<a name="sort-by-edit-time"></a>
145
146You can sort bugs by their edit time.
147
148| Qualifier | Example |
149| ------------------------------- | ------------------------------------------------------------------- |
150| `sort:edit` or `sort:edit-desc` | `sort:edit` will sort bugs by their descending last edition time |
151| `sort:edit-asc` | `sort:edit-asc` will sort bugs by their ascending last edition time |
152
153______________________________________________________________________
154
155##### See more
156
157- [A description of the data model][docs/design/model]
158- [How to use bridges][docs/usage/bridges]
159- [Learn about the native interfaces][docs/usage/interfaces]
160- [Understanding the workflow models][docs/usage/workflows]
161- :house: [Documentation home][docs/home]
162
163[docs/design/model]: ../design/data-model.md#you-cant-rely-on-the-time-provided-by-other-people-their-clock-might-by-off-for-anything-other-than-just-display
164[docs/home]: ../README.md
165[docs/usage/bridges]: ./third-party.md
166[docs/usage/interfaces]: ./interfaces.md
167[docs/usage/workflows]: ./workflows.md