Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-13508

Adding rpm metadata in 'include' clause breaks sort

    Details

      Description

      Sorting of RPMs in a yum repo by created date does not work if 'rpm.metadata.name' and/or 'rpm.metadata.version' are present in 'include' clause. So a call like this

      curl --user USER -X POST -H 'Content-type: application/json' ARTIFACTORY_URL/api/search/aql -d 'items.find({"repo":"REPOKEY", "@rpm.metadata.name": "RPMNAME"}).include("name", "@rpm.metadata.name", "@rpm.metadata.version", "created").sort({"$desc":["created"]})'
      

      still returns an unsorted list. But a call like this:

      curl --user USER -X POST -H 'Content-type: application/json' ARTIFACTORY_URL/api/search/aql -d 'items.find({"repo":"REPOKEY", "@rpm.metadata.name": "RPMNAME"}).include("name", "created").sort({"$desc":["created"]})'
      

      returns a properly sorted list.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bgoykhman Boris Goykhman
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: