Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user/search/advanced_search_syntax.md')
-rw-r--r--doc/user/search/advanced_search_syntax.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/user/search/advanced_search_syntax.md b/doc/user/search/advanced_search_syntax.md
index 5dc1f8fe779..d8fce3223ed 100644
--- a/doc/user/search/advanced_search_syntax.md
+++ b/doc/user/search/advanced_search_syntax.md
@@ -1,3 +1,10 @@
+---
+stage: Create
+group: Editor
+info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers"
+type: reference
+---
+
# Advanced Syntax Search **(STARTER)**
> - Introduced in [GitLab Enterprise Starter](https://about.gitlab.com/pricing/) 9.2
@@ -66,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/`