From cf3c537079c3d5e74486ee895562e717796e49e4 Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Wed, 2 Apr 2025 12:11:22 -0700 Subject: [PATCH] Docs for personalized search rankings --- docs/code-search/features.mdx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/code-search/features.mdx b/docs/code-search/features.mdx index 843e6e7c8..345d284b6 100644 --- a/docs/code-search/features.mdx +++ b/docs/code-search/features.mdx @@ -95,6 +95,32 @@ You get the following improvements: - **Reworked fuzzy finder ⌘K**: Find files and symbols quickly and easily with our whole new fuzzy finder - **File actions**: Like open in editor and open on code host +## Personalized search ranking + +Sourcegraph Enterprise users can get more personalized and better-ranked search results in the search bar for their codebases. With this feature, you get: + +- Improved ranking for keyword searches like "data router". This capability is enabled by default and cannot be configured +- Personalized ranking, specifically boosted results from repos you recently contributed to. This is controlled by the setting `experimentalFeatures.boostRelevantRepositories` + +These boosted results from your recently contributed repositories make finding the code you care about easier. + +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: + +```json +experimentalFeatures: { + boostRelevantRepositories: false +} +``` + +Here is an example of search results with personalized search ranking enabled: + +![search-ranking-enabled](https://storage.googleapis.com/sourcegraph-assets/Docs/personalized-search-rankings.png) + +As you can see, the results are now ranked based on their relevance to the query, and the results from repositories you've recently contributed to are boosted. + + ## Other search tips - When viewing a file or directory, press the `y` key to expand the URL to its canonical form (with the full 40-character Git commit SHA).