Skip to content

repos: Introduce repo.stars column for Github and Gitlab repos

Warren Gifford requested to merge tsenart/repo-stars-column into main

Created by: tsenart

This change set is a precursor to efficiently sorting repos by star count, which is our first iteration of search results ranking.

Denormalizing this data from the metadata column allows us to maintain consistency in the ReposStore.List method, which accepts an OrderBy option that expects a simple column field. The alternative of casing the repo type and the JSON access path at read time introduces too much additional complexity and is finicky to index properly.

I have tested the most simple forms of the repo listing queries we will do (in a clone of the prod database), and the results are great:

Screen Shot 2021-06-03 at 20 13 06

Follow up PRs will make use of this field for ranking repo type search results and suggestions.

Part of #21642 (closed)

Merge request reports

Loading