-
Notifications
You must be signed in to change notification settings - Fork 643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2 Search()? API broken when $filter, $orderby, $skip or $top is missing #7085
Comments
@matthid , we introduced a throttling rule that has a bug. We rolled it back so your scenario should work again. |
@matthid , a question: why do you use V2 API for search? Is there an advantage for using it and not V3 API? Documentation for V3 search is available here: https://docs.microsoft.com/en-gb/nuget/api/search-query-service-resource A query similar to V2: Will be in V3: |
Not really. We shouldn't even use the search API for this particular function/use case. It was probably contributed and never modified because it "worked" Anyway, thanks for the quick fix. Feel free to close. |
@matthid, would FAKE be open to move to NuGet's V3 APIs? These APIs scale better and are significantly more performant in countries like China. You can find documentation for the V3 APIs here, but we'd be happy to help the FAKE team with any questions! |
Please let us know if you need more info! |
Sure. it boils down to someone tracking all usages and replacing them. I'd accept such PRs. |
Previously this function worked. Recently, our tests working with the NuGet gallery started turning red.
While testing around a bit I noticed that the following still works:
www.nuget.org/api/v2/Search()?$filter=IsLatestVersion&$orderby=Id&$skip=0&$top=30&searchTerm='log4net'&targetFramework=''&includePrerelease=false
As soon as you leave out any of
$filter
,$orderby
,$skip
,$top
orsearchTerm
you receive:Therefore the following fails (which is what we have shipped/used in the function above):
www.nuget.org/api/v2/Search()?$filter=IsLatestVersion&searchTerm='log4net'&includePrerelease=false
And the following works again (and could be a workaround or the fix if this break was intended):
www.nuget.org/api/v2/Search()?$filter=IsLatestVersion&$orderby=Id&$skip=0&$top=30&searchTerm='log4net'
The text was updated successfully, but these errors were encountered: