diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-17 21:10:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-17 21:10:01 +0300 |
commit | 18da92341dac366b7bcfd13f2d3c443ffa315af0 (patch) | |
tree | 5189d9098a95d03d0b2b056f318a3637d9f547a7 /doc/user/search | |
parent | 073ebdcae8630bbcc849f7cfb4c27fd81bef99a5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/user/search')
-rw-r--r-- | doc/user/search/advanced_search_syntax.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/user/search/advanced_search_syntax.md b/doc/user/search/advanced_search_syntax.md index c325c7e5e92..d8fce3223ed 100644 --- a/doc/user/search/advanced_search_syntax.md +++ b/doc/user/search/advanced_search_syntax.md @@ -73,3 +73,20 @@ Examples: - Finding the text 'def create' inside files with the `.rb` extension: `def create extension:rb` - Finding the text `sha` inside files in a folder called `encryption`: `sha path:encryption` - Finding any file starting with `hello` containing `world` and with the `.js` extension: `world filename:hello* extension:js` + +#### Excluding filters + +[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/31684) in GitLab Starter 13.3. + +Filters can be inversed to **filter out** results from the result set, by prefixing the filter name with a `-` (hyphen) character, such as: + +- `-filename` +- `-path` +- `-extension` + +Examples: + +- Finding `rails` in all files but `Gemfile.lock`: `rails -filename:Gemfile.lock` +- Finding `success` in all files excluding `.po|pot` files: `success -filename:*.po*` +- Finding `import` excluding minified JavaScript (`.min.js`) files: `import -extension:min.js` +- Finding `docs` for all files outside the `docs/` folder: `docs -path:docs/` |