Add documentation for Issue Search (#1111)

changes from forgejo/forgejo#6952

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/1111
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: snematoda <snematoda.751k2@aleeas.com>
Co-committed-by: snematoda <snematoda.751k2@aleeas.com>
This commit is contained in:
snematoda 2025-03-23 09:21:11 +00:00 committed by Earl Warren
parent d83356bfc4
commit 45a6df824e
2 changed files with 59 additions and 0 deletions

View file

@ -38,6 +38,7 @@ involved in running it on their machines.
- [Webhooks](./webhooks/)
- [Programming language detection](./language-detection/)
- [Code Search](./code-search/)
- [Issue Search](./issue-search/)
- Authentication
- [Generating an Access Token](https://docs.codeberg.org/advanced/access-token/)
- [Access Token scope](./token-scope/)

58
docs/user/issue-search.md Normal file
View file

@ -0,0 +1,58 @@
---
title: Issue Search
license: 'CC-BY-SA-4.0'
---
Since v11, Issue search on Forgejo replaced it's previously dropdown defined behaviour of searches with a query syntax defined by operators.
## Query Syntax
### Keywords
1. Terms
Performs a fuzzy match search of each term in the query.
For example,
- `foo` will return results that contain `foo`, or any of it's derivatives (such as `for` or `food`)
- `foo bar` will return results that contain `foo` and/or `bar` or any of it's derivatives
2. Phrase
Performs an exact match for the provided phrase. This is done by wrapping the phrase in double quotes.
For example,
- `"foo"` will return results that contain an exact match of `foo`
- `"foo bar"` will return results that contain an exact match of `foo bar`
### Operators
1. Negation
Negates the keyword by returning results that does not contain the keyword. This is done by prefixing the keyword with a minus symbol.
For example,
- `-foo` will return results that does not contain `foo` or it's derivatives
- `-"foo bar"` will return results that does not contain `foo bar`
2. Required
Denotes that the provided keyword MUST be present. This is done by prefixing the keyword with with a plus symbol.
For example,
- `+foo +bar` will return results that contain both `foo` and `bar` (or its fuzzy derivatives)
- `+"foo" +"bar"` will return results that contain exactly both `foo` and `bar`
- `+"foo bar" +"baz"` will return results that contain exactly both `foo bar` and `baz`
### Escaping
All operators may be escaped by adding a backslash in front of the operators.
For example,
- `"\"\""` will search for `""`
- `\+1` will search for `+1`