parent
e31dda35df
commit
6df7f60e4a
4 changed files with 33 additions and 17 deletions
|
@ -332,11 +332,11 @@ def get_sorted_matching_repositories(prefix, only_public, checker, limit=10):
|
|||
# For performance reasons, we conduct the repo name and repo namespace searches on their
|
||||
# own. This also affords us the ability to give higher precedence to repository names matching
|
||||
# over namespaces, which is semantically correct.
|
||||
get_search_results(Repository.name ** (prefix + '%'), with_count=True)
|
||||
get_search_results(Repository.name ** (prefix + '%'), with_count=False)
|
||||
get_search_results(_basequery.prefix_search(Repository.name, prefix), with_count=True)
|
||||
get_search_results(_basequery.prefix_search(Repository.name, prefix), with_count=False)
|
||||
|
||||
get_search_results(Namespace.username ** (prefix + '%'), with_count=True)
|
||||
get_search_results(Namespace.username ** (prefix + '%'), with_count=False)
|
||||
get_search_results(_basequery.prefix_search(Namespace.username, prefix), with_count=True)
|
||||
get_search_results(_basequery.prefix_search(Namespace.username, prefix), with_count=False)
|
||||
|
||||
return results
|
||||
|
||||
|
|
Reference in a new issue