From d1c98654341f604ef8e2ad8f433b2548f84fc20b Mon Sep 17 00:00:00 2001 From: Siddharth Dungarwal Date: Mon, 3 Feb 2025 14:29:19 +0530 Subject: [PATCH 1/3] Update docs to use admin settings to update global search settings --- doc/user/search/index.md | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/doc/user/search/index.md b/doc/user/search/index.md index bab4d28bfff99d..fca6bfa5f138e7 100644 --- a/doc/user/search/index.md +++ b/doc/user/search/index.md @@ -61,22 +61,17 @@ 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). - -| 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). | - -All global search scopes are enabled by default on self-managed instances. +by disabling one or more search scopes for global search. This can be done from search settings in admin panel. To enable or disable the setting you can: + +1. Go to `Settings` > `Search` in the side bar on the admin page. +1. Under the Global Search Pane you can see the scopes for enabled global search. +1. You can then check/uncheck the scope you want to enable/disable for global search. +1. Then you press `Save` to save the settings. + +All global search scopes are enabled by default on GitLab Self-Managed instances. ## Global search validation -- GitLab From bdf4f886e23ce91737da292ba2cca944ad769c25 Mon Sep 17 00:00:00 2001 From: Siddharth Dungarwal Date: Tue, 4 Feb 2025 08:54:35 +0000 Subject: [PATCH 2/3] Apply 2 suggestion(s) to 1 file(s) Co-authored-by: Ashraf Khamis --- doc/user/search/index.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/doc/user/search/index.md b/doc/user/search/index.md index fca6bfa5f138e7..8ca320c9f89711 100644 --- a/doc/user/search/index.md +++ b/doc/user/search/index.md @@ -55,7 +55,7 @@ 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 @@ -63,16 +63,22 @@ DETAILS: > - [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 search scopes for global search. This can be done from search settings in admin panel. To enable or disable the setting you can: +Prerequisites: -1. Go to `Settings` > `Search` in the side bar on the admin page. -1. Under the Global Search Pane you can see the scopes for enabled global search. -1. You can then check/uncheck the scope you want to enable/disable for global search. -1. Then you press `Save` to save the settings. +- 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. +To disable one or more global search scopes: + +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 > - Support for partial matches in issue search [removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/71913) in GitLab 14.9 [with a flag](../../administration/feature_flags.md) named `issues_full_text_search`. Disabled by default. -- GitLab From b73a3ba29409487014d691c6280253c87799e1f1 Mon Sep 17 00:00:00 2001 From: Siddharth Dungarwal Date: Tue, 4 Feb 2025 14:55:47 +0530 Subject: [PATCH 3/3] Update anchor tags --- .../application_settings/_global_search_settings.html.haml | 2 +- doc/administration/instance_limits.md | 2 +- 2 files changed, 2 insertions(+), 2 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 185bc4035b3b16..f1b9b0cd319b2a 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 8ee7023cef030b..f1c15b1bb553bc 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: -- GitLab