Add new feature flag to sort search results by zoekt ranking
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.
Co-authored-by: Keegan Carruthers-Smith [email protected]