A FindPackageById() query that has more than 80 results will generate a feed that contains the a "next" href to the second page of results. The problem is that when a virtual repo that aggregates two local repos for example is used -
$skip=1 actually skips 2 packages
$skip=2 actually skips 4 packages
$skip=3 actually skips 6 packages, etc...
To witness this behaviour:
1.Create two local nuget repos nuget-local & nuget-local-2
2.Create a virtual repo that contains both of them
3.Use the attached script that will upload 81 packages to artifactory - 40 to nuget-local and 41 to nuget-local-2
2.run the FindPackagesById() query on the virtual repo:
3.grep for <entry> - note that you there are 79 results instead of 80
Although we skipped just 1, we still got 79 packages, and not the expected 80.
The $skip token we put in the "next" href always skips 80 packages. So, if a user has 160 package versions in his repo for example, skipping 80 is equivalent to skipping 160 packages. This essentially means that the next href will have zero results.