Uploaded image for project: 'Project Quay'
  1. Project Quay
  2. PROJQUAY-7244

Allow refining searches with an organization

XMLWordPrintable

    • False
    • None
    • False

      Feature Request 

      The search in Quay currently uses the name of the repository for filtering. This returns results across many different organizations. It is currently not possible to filter for repositories under specific organizations. I think it would be a benefit to allow specifying the organization as part of the search filter.

      Example (At time of writing)
      On quay.io, searching for python-311 returns many different results (as expected). However, I as a user, know that I want fedora/python-311. I should be able to search fedora/python-311 and get back the narrowed result (ideally a list of 1).

      Similar functionality is present in DockerHub where searching for python returns many results, while searching for bitnami/python returns the narrowed result set (in this case, 1 result).

      Expected Behavior
      Searching for organization/repository should bring me back the repository under that organization. (All other match rules stay the same: e.g. fedora/py)

      Possible Solution

      When hitting the search button, it makes a call to
      /api/v1/find/repositories?query=<QUERYTERM>&page=1&includeUsage=true

      This leads us to this file data/model/repository.py, where the filtering logic is in this function _get_sorted_matching_repositories.

      I have forked the repo and made an attempt at implementing this fix. All the tests (via tox) passed on my end. I can make a PR if this issue is worth exploring/implementing.

      Considerations

      • I think dockerhub limits the number of characters in a search when using the organization; Should the fix do the same? (e.g nginx-ingress-contoller can filter by drud but not rancher,bitnami)

       

      Disclaimer: All organizations/repositories were chosen to highlight the issue/feature request. That is all

              bcaton@redhat.com Brandon Caton
              nmaloof@redhat.com Nicholas Maloof
              Weihua Hu Weihua Hu
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: