From e11fe697f7626944a8ddb90c5b5a3e324aad6305 Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Tue, 6 Oct 2026 17:07:24 -0600 Subject: [PATCH] docs: Remove stale experimentalFeatures settings Checked every experimentalFeatures mention in docs/ against schema/site.schema.json and schema/settings.schema.json in sourcegraph/sourcegraph (a3a37dbc396). - perforce: perforceChangelistMapping has defaulted to enabled since 5.10; describe how to disable it instead of how to enable it - search-contexts: searchContextsQuery is deprecated and permanently enabled; drop the enabling instructions, drop (beta) from the heading, and fix the four links to the never-valid #beta-... anchor - search: version contexts were removed in 2023; drop them from the indexing callout; document search.index.query.contexts next to search.index.branches, as one full JSON object - enable-experimental-feature: searchStreaming and showSearchContext were removed in 2023; use settings that exist, and link the reference list - settings: settings are read from the database on every request and need no restart; drop the restart warning - syntactic-code-navigation, features: show experimentalFeatures keys as valid, nested JSON Amp-Thread-ID: https://ampcode.com/threads/T-01a112ff-1279-710b-af98-68cb8c5a8dcc Co-authored-by: Amp --- docs/admin/config/settings.mdx | 9 -------- .../how-to/enable-experimental-feature.mdx | 9 ++++---- docs/admin/repo/perforce.mdx | 20 ++++++++-------- docs/admin/search.mdx | 23 ++++++++----------- .../explanations/code-insights-filters.mdx | 2 +- .../how-tos/filtering-an-insight.mdx | 4 ++-- .../syntactic-code-navigation.mdx | 6 ++++- docs/code-search/features.mdx | 8 ++++--- docs/code-search/working/search-contexts.mdx | 8 +++---- .../getting-started/github-vs-sourcegraph.mdx | 2 +- 10 files changed, 40 insertions(+), 51 deletions(-) diff --git a/docs/admin/config/settings.mdx b/docs/admin/config/settings.mdx index 7e43522dc..c27cf95b2 100644 --- a/docs/admin/config/settings.mdx +++ b/docs/admin/config/settings.mdx @@ -12,15 +12,6 @@ Settings can be set at the global level (by administrators), the organization le Global settings are found in **Administration > Global settings** while links to organization and user settings are found in the user dropdown menu. -After setting or changing certain values in **Administration > Global settings** the frontend will restart automatically or -you might be asked to restart the frontend for the changes to take effect. -In case of a Kubernetes deployment this can be done as follows: - -``` -bash -kubectl delete pods -l app=sourcegraph-frontend -``` - ## Reference Settings options and their default values are shown below. diff --git a/docs/admin/how-to/enable-experimental-feature.mdx b/docs/admin/how-to/enable-experimental-feature.mdx index c8dfe8c0a..82332d7e0 100644 --- a/docs/admin/how-to/enable-experimental-feature.mdx +++ b/docs/admin/how-to/enable-experimental-feature.mdx @@ -16,15 +16,14 @@ This document will take you through how to add, enable, or disable an experiment ```json "experimentalFeatures": { - "searchStreaming": true, - "showSearchContext": false, + "searchResultsAggregations": true, + "showCodeMonitoringLogs": false, }, ``` 3. Locate the feature you would like to disable or enable, setting `true` for enable or `false` for disable. -4. If adding a feature, follow the format `"featureName": true,` -5. After changing the values in Administration > Global settings, the frontend will either restart automatically or you might be asked to restart the frontend for the changes to take effect. -6. For more information, see [Editing global settings for administrators](/admin/config/settings#editing-global-settings-for-site-admins) +4. If adding a feature, follow the format `"featureName": true,`. The available features are listed under `experimentalFeatures` in the [settings reference](/admin/config/settings#reference). +5. For more information, see [Editing global settings for administrators](/admin/config/settings#editing-global-settings-for-site-admins) ## Further resources diff --git a/docs/admin/repo/perforce.mdx b/docs/admin/repo/perforce.mdx index c9bd56a12..cfe83642a 100644 --- a/docs/admin/repo/perforce.mdx +++ b/docs/admin/repo/perforce.mdx @@ -303,25 +303,23 @@ The following experimental features are available for Perforce depots. These are ### Changelist ID in URLs -Note: When enabling changelist IDs in URLs for the first time, Perforce depots can be unavailable for a few minutes on the Sourcegraph instance, due to the initial mapping of changelist IDs to generated commit ID happening in the background. If you have a large number of Perforce depots, we recommend proceeding with the following steps in a maintenance window in which you don't expect large amounts of traffic on your Sourcegraph instance. +URLs for Perforce code hosts use the Changelist (CL) ID instead of commit SHAs. Areas that benefit from this at the moment are: -Add `"perforceChangelistMapping": "enabled",` to `experimentalFeatures` in the [advanced configuration](/admin/config/site-config): +- Viewing a specific CL +- Viewing the files of a depot at a specific CL +- Viewing a specific file added / removed / modified in a specific CL +- Viewing the list of CLs + +To disable it, add this to the [advanced configuration](/admin/config/site-config): ```json { "experimentalFeatures": { - "perforceChangelistMapping": "enabled" + "perforceChangelistMapping": "disabled" } } ``` -When enabled, URLs for Perforce code hosts will use the Changelist (CL) ID instead of commit SHAs. Areas that benefit from this at the moment are: - -- Viewing a specific CL -- Viewing the files of a depot at a specific CL -- Viewing a specific file added / removed / modified in a specific CL -- Viewing the list of CLs - ### Searching within a specific changelist You can search within a specific changelist by referring to the changelist as a reference path like `changelist/123` where 123 is the changelist id. For example, given a repo path of `Talkhouse/main` and a changelist id of `123`, you can search within that changelist by using the following query: @@ -339,7 +337,7 @@ repo:^Talkhouse/main$ rev:changelist/123 text to find #### Limitations - After a depot is cloned or fetched, Sourcegraph computes and stores mappings of CL IDs to commit SHAs. This mapping can take several minutes for large clones/fetches. When a background mapping job is running, the depot won't be serviceable as URLs referring to CL IDs may not resolve and users may see an error while interacting with the depot. -- This experimental configuration can not be selectively enabled for a specific perforce depot. +- This experimental configuration can not be selectively enabled or disabled for a specific perforce depot. #### Mechanism diff --git a/docs/admin/search.mdx b/docs/admin/search.mdx index 468c8ad72..24a753030 100644 --- a/docs/admin/search.mdx +++ b/docs/admin/search.mdx @@ -90,24 +90,21 @@ The resource requirements for indexed search vary considerably based on the text Sourcegraph always maintains an index of the source code on your default branch. Some organizations have other branches that are regularly searched. To speed up search for those branches, Sourcegraph can be configured to index up to 64 branches per repository. -You can configure indexed branches in advanced configuration under the `experimentalFeatures.search.index.branches` setting. For example: +Configure the extra branches per repository with `search.index.branches`. To also index the revisions matched by [query-based search contexts](/code-search/working/search-contexts#query-based-search-contexts), set `search.index.query.contexts`: ```json -"experimentalFeatures": { - "search.index.branches": { - "github.com/sourcegraph/sourcegraph": ["3.15", "develop"], - "github.com/sourcegraph/src-cli": ["next"] - } +{ + "experimentalFeatures": { + "search.index.branches": { + "github.com/sourcegraph/sourcegraph": ["3.15", "develop"], + "github.com/sourcegraph/src-cli": ["next"] + }, + "search.index.query.contexts": true + } } ``` -Indexing multiple branches will add additional resource requirements to Sourcegraph (particularly memory). The indexer will deduplicate documents between branches. So the size of your index will grow in relation to the number of unique documents. Refer to our [resource estimator](/self-hosted/deploy/resource-estimator) to estimate whether additional resources are required. - - - {' '} - The default branch (HEAD) and all revisions specified in version contexts are - always indexed. - +The indexer deduplicates documents between branches, so the size of your index will grow with the number of unique documents. Indexing multiple branches will increase CPU and memory requirements. ### Scaling considerations diff --git a/docs/code-insights/explanations/code-insights-filters.mdx b/docs/code-insights/explanations/code-insights-filters.mdx index 83662c361..9fe5c9217 100644 --- a/docs/code-insights/explanations/code-insights-filters.mdx +++ b/docs/code-insights/explanations/code-insights-filters.mdx @@ -21,7 +21,7 @@ If you combine both filters, the inclusion pattern will be applied first, then t ### `context:` Query-based search context filters -You can use a [query-based search context](/code-search/working/search-contexts#beta-query-based-search-contexts) to filter your insights to only results matching repositories that match the `repo:` or `-repo:` filter of the query-based context. +You can use a [query-based search context](/code-search/working/search-contexts#query-based-search-contexts) to filter your insights to only results matching repositories that match the `repo:` or `-repo:` filter of the query-based context. You can use this to filter multiple insights to a group of repositories that need only be maintained in one location. When you update a context that's being used as a filter, the next time you load the page, the filtered insight will reflect the updated context. As with explicit `repo:` filters, only repository regex expressions are allowed: you cannot specify repository revisions or predicate filters. diff --git a/docs/code-insights/how-tos/filtering-an-insight.mdx b/docs/code-insights/how-tos/filtering-an-insight.mdx index 3dc78ac1d..c3bd60d33 100644 --- a/docs/code-insights/how-tos/filtering-an-insight.mdx +++ b/docs/code-insights/how-tos/filtering-an-insight.mdx @@ -28,9 +28,9 @@ Examples: ### 3. Or, filter to include a reusable group of repositories using a query-based search context -In the `context:` field of the filter panel, you can use a [query-based search context](/code-search/working/search-contexts#beta-query-based-search-contexts) to filter your insights to only results matching repositories that match the query-based context's `repo:` filter. +In the `context:` field of the filter panel, you can use a [query-based search context](/code-search/working/search-contexts#query-based-search-contexts) to filter your insights to only results matching repositories that match the query-based context's `repo:` filter. -First, if you haven't already created a search context, create a [query-based search context](/code-search/working/search-contexts#beta-query-based-search-contexts). You can define any group of repos using the syntax `repo:(^github\.com/sourcegraph/sourcegraph$|^github\.com/sourcegraph/about$...)`. +First, if you haven't already created a search context, create a [query-based search context](/code-search/working/search-contexts#query-based-search-contexts). You can define any group of repos using the syntax `repo:(^github\.com/sourcegraph/sourcegraph$|^github\.com/sourcegraph/about$...)`. Then, in the context field, reference the search context's name, usually `@owner/name-of-context`. diff --git a/docs/code-navigation/syntactic-code-navigation.mdx b/docs/code-navigation/syntactic-code-navigation.mdx index 3f7586b9c..b2fd650a1 100644 --- a/docs/code-navigation/syntactic-code-navigation.mdx +++ b/docs/code-navigation/syntactic-code-navigation.mdx @@ -24,7 +24,11 @@ but only if Precise data is not available. To summarize, the order of priorities First, enable the experimental feature flag in Advanced configuration: ```json - "experimentalFeatures.codeintelSyntacticIndexing.enabled": true +{ + "experimentalFeatures": { + "codeintelSyntacticIndexing.enabled": true + } +} ``` Next, you need to ensure that syntactic indexing is enabled in a code graph configuration policy. Note that for cloud customers this feature is enabled by default for all repositories, as part of diff --git a/docs/code-search/features.mdx b/docs/code-search/features.mdx index 0b39d7cb6..cbd571f25 100644 --- a/docs/code-search/features.mdx +++ b/docs/code-search/features.mdx @@ -107,11 +107,13 @@ These boosted results from your recently contributed repositories make finding t The personalized search ranking works best if you have large codebases, especially for new users who may otherwise get overwhelmed by results from unfamiliar or irrelevant repositories. -Personalized search ranking is enabled by default, but you can disable it from your settings via: +Personalized search ranking is enabled by default, but you can disable it in your [settings](/admin/config/settings): ```json -experimentalFeatures: { - boostRelevantRepositories: false +{ + "experimentalFeatures": { + "boostRelevantRepositories": false + } } ``` diff --git a/docs/code-search/working/search-contexts.mdx b/docs/code-search/working/search-contexts.mdx index 6642ae003..f1479329c 100644 --- a/docs/code-search/working/search-contexts.mdx +++ b/docs/code-search/working/search-contexts.mdx @@ -112,7 +112,7 @@ For example: You will be returned to the list of search contexts. Your new search context will appear in the search contexts selector in the search input, and can be [used immediately](#using-search-contexts). -## Query-based search contexts (beta) +## Query-based search contexts Search contexts can be defined with a restricted search query as an alternative to a specific list of repositories and revisions. Allowed filters are: `repo`, `rev`, `file`, `lang`, `case`, `fork`, and `visibility`. `OR` and `AND` expressions are also allowed. @@ -121,8 +121,6 @@ Search contexts can be defined with a restricted search query as an alternative `repo:has.content` etc, aren't currently supported in search contexts. -If you're an admin, to enable this feature for all users set `experimentalFeatures.searchContextsQuery` to `true` in your global settings (for regular users, just use the normal settings menu). You'll then see a "Create context" button from the search results page and a "Query" input field in the search contexts form. If you want revisions specified in these query based search contexts to be indexed, set `experimentalFeatures.search.index.query.contexts` to `true` in advanced configuration. +You can also create a query-based search context from the search results page, using the **Create context** button above the results. -### Creating search contexts from search results - -You can now create new search contexts right from the search results page. Once you've enabled query-based search contexts you'll see a Create context button above the search results. +To index the revisions matched by a query-based search context for faster searching, see [Multi-branch indexing](/admin/search#multi-branch-indexing). diff --git a/docs/getting-started/github-vs-sourcegraph.mdx b/docs/getting-started/github-vs-sourcegraph.mdx index f8d45c2f9..a1694bc84 100644 --- a/docs/getting-started/github-vs-sourcegraph.mdx +++ b/docs/getting-started/github-vs-sourcegraph.mdx @@ -221,7 +221,7 @@ Search contexts are an alternative way to narrow down the scope of your search t You can create custom search contexts to be simple or advanced with GitHub. Simple search contexts are things such as repository or organization name, and advanced search contexts can mix multiple attributes, including languages. GitHub’s search contexts allow for more personalization than Sourcegraph. -With Sourcegraph, a [search context](/code-search/working/search-contexts) represents the body of code that will be searched. Search contexts can be private to the user who creates it or shared with other users on the same Sourcegraph instance. [Query-based ](/code-search/working/search-contexts#beta-query-based-search-contexts)search contexts (beta) are an additional way to create search contexts based on variables like repository, rev, file, lang, case, fork, and visibility. Both [OR] and [AND] expressions are allowed to help further narrow the scope of query-based search contexts. +With Sourcegraph, a [search context](/code-search/working/search-contexts) represents the body of code that will be searched. Search contexts can be private to the user who creates it or shared with other users on the same Sourcegraph instance. [Query-based search contexts](/code-search/working/search-contexts#query-based-search-contexts) are an additional way to create search contexts based on variables like repository, rev, file, lang, case, fork, and visibility. Both [OR] and [AND] expressions are allowed to help further narrow the scope of query-based search contexts. | **Features** | **GitHub** | **Sourcegraph** | | --------------- | ----------------------- | ------------------------------------ |