Merge pull request #2568 from coreos-inc/fix-postgres-search

Fix search in postgres
This commit is contained in:
josephschorr 2017-04-21 17:22:59 -04:00 committed by GitHub
commit cc88cfb6ad

View file

@ -481,6 +481,7 @@ def _get_sorted_matching_repositories(lookup_value, repo_kind='image', include_p
query = (query
.switch(Repository)
.join(RepositorySearchScore)
.group_by(Repository, Namespace, RepositorySearchScore)
.order_by(RepositorySearchScore.score.desc()))
return query