NuGet Feed ignoring skip and take

When querying the nuget feed for teamcity SearchQueryService ignores the skip and take commands.

/httpAuth/app/nuget/feed/_Root/default/v3/query?skip=2&take=5&prerelease=false&semVerLevel=2.0.0

Following the MS Nuget guidelines these parameters should work. https://learn.microsoft.com/en-us/nuget/api/search-query-service-resource

Am I looking at the wrong guides or should I be entering something different?

0
6 comments
Hi! I've just checked those on TeamCity 2022.10.2, and they worked. Which version are you on?
0

I'm using TeamCity Enterprise 2022.10.2 (build 117025)

Running a query with no parameters: /query returns 99 hits

When I add the take=1 parameter it returns 99 hits

0
It looks like there is an issue with the totalHits field. Can you confirm the actual number of returned packages is valid (1 in the case above)?
0

The totalHits was correct for the query 99. However when adding take parameter it still returned 99.

Similarly in this screenshot. The query returns two hits, when adding the take parameter it still returns 2 hits.

0

I've also tried a similar query on the v2 schema and I get an error message about duplicate parameters

0

Thank you for investigating. It looks like our issue is created by the use of an IIS Reverse Proxy. In both cases the parameters are being manipulated. Running the query locally (not via the reverse proxy) the calls return the expected number of results.

Thanks for your help.

1

Please sign in to leave a comment.