1# Searching bugs
2
3You can search bugs using a micro query language for both filtering and sorting. A query could look like this:
4
5```
6status:open sort:edit
7```
8
9A few tips:
10
11- queries are case insensitive.
12- you can combine as many qualifiers as you want.
13- you can use double quotes for multi-word search terms. For example, `author:"René Descartes"` searches for bugs opened by René Descartes, whereas `author:René Descartes` will throw an error since full-text search is not yet supported.
14
15
16## Filtering
17
18### Filtering by status
19
20You can filter bugs based on their status.
21
22| Qualifier | Example |
23| --- | --- |
24| `status:open` | `status:open` matches open bugs |
25| `status:closed` | `status:closed` matches closed bugs |
26
27### Filtering by author
28
29You can filter based on the person who opened the bug.
30
31| Qualifier | Example |
32| --- | --- |
33| `author:QUERY` | `author:descartes` matches bugs opened by `René Descartes` or `Robert Descartes` |
34| | `author:"rené descartes"` matches bugs opened by `René Descartes` |
35
36### Filtering by participant
37
38You can filter based on the person who participated in any activity related to the bug (Opened bug or added a comment).
39
40| Qualifier | Example |
41| --- | --- |
42| `participant:QUERY` | `participant:descartes` matches bugs opened or commented by `René Descartes` or `Robert Descartes` |
43| | `participant:"rené descartes"` matches bugs opened or commented by `René Descartes` |
44
45### Filtering by actor
46
47You can filter based on the person who interacted with the bug.
48
49| Qualifier | Example |
50| --- | --- |
51| `actor:QUERY` | `actor:descartes` matches bugs edited by `René Descartes` or `Robert Descartes` |
52| | `actor:"rené descartes"` matches bugs edited by `René Descartes` |
53| `
54
55**NOTE**: interaction with bugs include: opening the bug, adding comments, adding/removing labels etc...
56
57### Filtering by label
58
59You can filter based on the bug's label.
60
61| Qualifier | Example |
62| --- | --- |
63| `label:LABEL` | `label:prod` matches bugs with the label `prod` |
64| | `label:"Good first issue"` matches bugs with the label `Good first issue` |
65
66### Filtering by title
67
68You can filter based on the bug's title.
69
70| Qualifier | Example |
71| --- | --- |
72| `title:TITLE` | `title:Critical` matches bugs with a title containing `Critical` |
73| | `title:"Typo in string"` matches bugs with a title containing `Typo in string` |
74
75
76### Filtering by missing feature
77
78You can filter bugs based on the absence of something.
79
80| Qualifier | Example |
81| --- | --- |
82| `no:label` | `no:label` matches bugs with no labels |
83
84## Sorting
85
86You can sort results by adding a `sort:` qualifier to your query. “Descending” means most recent time or largest ID first, whereas “Ascending” means oldest time or smallest ID first.
87
88Note: to deal with differently-set clocks on distributed computers, `git-bug` uses a logical clock internally rather than timestamps to order bug changes over time. That means that the timestamps recorded might not match the returned ordering. More on that in [the documentation](model.md#you-cant-rely-on-the-time-provided-by-other-people-their-clock-might-by-off-for-anything-other-than-just-display)
89
90### Sort by Id
91
92| Qualifier | Example |
93| --- | --- |
94| `sort:id-desc` | `sort:id-desc` will sort bugs by their descending Ids |
95| `sort:id` or `sort:id-asc` | `sort:id` will sort bugs by their ascending Ids |
96
97### Sort by Creation time
98
99You can sort bugs by their creation time.
100
101| Qualifier | Example |
102| --- | --- |
103| `sort:creation` or `sort:creation-desc` | `sort:creation` will sort bugs by their descending creation time |
104| `sort:creation-asc` | `sort:creation-asc` will sort bugs by their ascending creation time |
105
106### Sort by Edit time
107
108You can sort bugs by their edit time.
109
110| Qualifier | Example |
111| --- | --- |
112| `sort:edit` or `sort:edit-desc` | `sort:edit` will sort bugs by their descending last edition time |
113| `sort:edit-asc` | `sort:edit-asc` will sort bugs by their ascending last edition time |