From fdcc0ab917298386f6a54a1c764fc16d9f968625 Mon Sep 17 00:00:00 2001
From: Siddharth Dungarwal <sdungarwal@gitlab.com>
Date: Tue, 4 Feb 2025 14:31:49 +0000
Subject: [PATCH] Update docs to use admin settings to update global search
 settings

---
 .../_global_search_settings.html.haml         |  2 +-
 doc/administration/instance_limits.md         |  2 +-
 doc/user/search/index.md                      | 29 ++++++++++---------
 3 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/app/views/admin/application_settings/_global_search_settings.html.haml b/app/views/admin/application_settings/_global_search_settings.html.haml
index 185bc4035b3b1..f1b9b0cd319b2 100644
--- a/app/views/admin/application_settings/_global_search_settings.html.haml
+++ b/app/views/admin/application_settings/_global_search_settings.html.haml
@@ -4,7 +4,7 @@
   expanded: expanded_by_default?) do |c|
   - c.with_description do
     = _('Configure settings for global search.')
-    = link_to _('Learn more.'), help_page_path('user/search/index.md', anchor: 'global-search-scopes'), target: '_blank', rel: 'noopener noreferrer'
+    = link_to _('Learn more.'), help_page_path('user/search/index.md', anchor: 'disable-global-search-scopes'), target: '_blank', rel: 'noopener noreferrer'
   - c.with_body do
     = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-global-search-settings'), html: { class: 'fieldset-form', id: 'global-search-settings' } do |f|
       = form_errors(@application_setting)
diff --git a/doc/administration/instance_limits.md b/doc/administration/instance_limits.md
index 8ee7023cef030..f1c15b1bb553b 100644
--- a/doc/administration/instance_limits.md
+++ b/doc/administration/instance_limits.md
@@ -168,7 +168,7 @@ Set the limit to `0` to disable it.
 ### Search rate limit
 
 > - [Changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/104208) in GitLab 15.9 to include issue, merge request, and epic searches in the rate limit.
-> - [Changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/118525) in GitLab 16.0 to apply rate limits to [search scopes](../user/search/index.md#global-search-scopes) for authenticated requests.
+> - [Changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/118525) in GitLab 16.0 to apply rate limits to [search scopes](../user/search/index.md#disable-global-search-scopes) for authenticated requests.
 
 This setting limits search requests as follows:
 
diff --git a/doc/user/search/index.md b/doc/user/search/index.md
index d8ec7361c011d..8ca320c9f8971 100644
--- a/doc/user/search/index.md
+++ b/doc/user/search/index.md
@@ -55,28 +55,29 @@ To restrict `/search` to authenticated users only, do one of the following:
 To restrict global search to authenticated users only,
 enable the `ops` feature flag `block_anonymous_global_searches`.
 
-## Global search scopes
+## Disable global search scopes
 
 DETAILS:
 **Tier:** Free, Premium, Ultimate
 **Offering:** GitLab Self-Managed
 
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68640) in GitLab 14.3.
+> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/179688) in GitLab 17.9.
 
-To improve the performance of your instance's global search, an administrator can limit the search scope
-by disabling one or more [`ops` feature flags](../../development/feature_flags/_index.md#ops-type).
+Prerequisites:
+
+- You must have administrator access to the instance.
+
+To improve the performance of your instance's global search,
+you can disable one or more search scopes.
+All global search scopes are enabled by default on GitLab Self-Managed instances.
 
-| Scope          | Feature flag                       | Description                                                                               |
-|----------------|------------------------------------|-------------------------------------------------------------------------------------------|
-| Code           | `global_search_code_tab`           | When enabled, global search includes code.                                                |
-| Commits        | `global_search_commits_tab`        | When enabled, global search includes commits.                                             |
-| Epics          | `global_search_epics_tab`          | When enabled, global search includes epics.                                               |
-| Issues         | `global_search_issues_tab`         | When enabled, global search includes issues.                                              |
-| Merge requests | `global_search_merge_requests_tab` | When enabled, global search includes merge requests.                                      |
-| Users          | `global_search_users_tab`          | When enabled, global search and command palette includes users.                                               |
-| Wiki           | `global_search_wiki_tab`           | When enabled, global search includes project and [group wikis](../project/wiki/group.md). |
+To disable one or more global search scopes:
 
-All global search scopes are enabled by default on self-managed instances.
+1. On the left sidebar, at the bottom, select **Admin**.
+1. Select **Settings > Search**.
+1. Expand **Global search**.
+1. Clear the checkboxes for the scopes you want to disable.
+1. Select **Save changes**.
 
 ## Global search validation
 
-- 
GitLab