1# Searching bugs
2
3You can search bugs using a micro query language for both filtering and sorting. A query could looks like this:
4
5```
6status:open sort:edit
7```
8
9A few tips:
10
11- query are case insensitive.
12- you can combine as much qualifier as you want.
13- you can use quotation for multi-word search term. For example, use `author:"René Descartes"` to search with a complete name.
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 label
37
38You can filter based on bug's label.
39
40| Qualifier | Example |
41| --- | --- |
42| `label:LABEL` | `label:prod` matches bugs with the label `prod` |
43| | `label:"Good first issue"` matches bugs with the label `Good first issue` |
44
45### Filtering by missing feature
46
47You can filter bugs based on the absence of something.
48
49
50| Qualifier | Example |
51| --- | --- |
52| `no:label` | `no:label` matches bugs with no labels |
53
54## Sorting
55
56You can sort result by adding a `sort:` qualifier to your query.
57
58### Sort by Id
59
60| Qualifier | Example |
61| --- | --- |
62| `sort:id-desc` | `sor:id-desc` will sort bugs by their descending Ids |
63| `sort:id` or `sort:id-asc` | `sor:id` will sort bugs by their ascending Ids |
64
65### Sort by Creation time
66
67You can sort bugs by their creation time.
68
69Note: to deal with badly set clocks in a distributed system, `git-bug` use a logical clock internally rather than timestamp to order bugs edition 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)
70
71| Qualifier | Example |
72| --- | --- |
73| `sort:creation` or `sort:creation-desc` | `sor:creation` will sort bugs by their descending creation time |
74| `sort:creation-asc` | `sor:creation-asc` will sort bugs by their ascending creation time |
75
76### Sort by Edition time
77
78You can sort bugs by their edition time.
79
80Note: to deal with badly set clocks in a distributed system, `git-bug` use a logical clock internally rather than timestamp to order bugs edition 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)
81
82| Qualifier | Example |
83| --- | --- |
84| `sort:edit` or `sort:edit-desc` | `sor:edit` will sort bugs by their descending last edition time |
85| `sort:edit-asc` | `sor:edit-asc` will sort bugs by their ascending last edition time |