Merge pull request #2531 from coreos-inc/repo-score

Switch to using RepositorySearchScore table for search ranking
This commit is contained in:
josephschorr 2017-04-13 11:51:59 -04:00 committed by GitHub
commit c78ec89305

View file

@ -475,9 +475,8 @@ def _get_sorted_matching_repositories(lookup_value, repo_kind='image', include_p
query = (query
.switch(Repository)
.join(RepositoryActionCount)
.where(RepositoryActionCount.date >= last_week)
.order_by(fn.Sum(RepositoryActionCount.count).desc()))
.join(RepositorySearchScore)
.order_by(RepositorySearchScore.score.desc()))
return query