Skip to content

Add new feature flag to sort search results by zoekt ranking

Warren Gifford requested to merge olafurpg/result-ranking into main

Created by: olafurpg

Me and @keegancsmith paired on this change.

Previously, search results within a file were sorted by line numbers. This meant that a highly-relevant result would sometimes get collapsed by default if it appears at the bottom of a file. This commit adds a new experimental feature flag to enable new search result ranking that places the most relevant results (according to Zoekt) at the top of the results. The feature flag is disabled by default to make it easier to iterate on the new behavior before we make it public for everybody.

Example

The images below show the difference in how results for the query repo:^github\.com/moby/moby$ add index:only are rendered before and after this PR.

Before: image

After: image

Co-authored-by: Keegan Carruthers-Smith [email protected]

Merge request reports

Loading