Nugetgallery: V2 Search endpoint orderby=Id is sorting by title

Created on 12 Oct 2016  路  3Comments  路  Source: NuGet/NuGetGallery

@joelverhagen wrote:
I just noticed something strange with the orderby query parameter on the V2 Search results. It seems to be sorting by title instead of ID. This is confusing, as it does not match the name. Also, the behavior is different on the Packages() endpoint (i.e. the raw OData query).

I think it has something to do with the V2/V3 search service since that is the component that is serving up Search().

Is this a problem? The way I found it was that nuget.exe list on NuGet.org is dumping packages in title order not ID order.

Here鈥檚 some examples:

NuGet Search()

| Position | ID | Title |
| --- | --- | --- |
| 1 | bang.test.bench | !test bench |
| 2 | DeveloperInTheFlow.Nini | "Developer In The Flow Unofficial Nini Configuration" |
| 3 | libpxcclr.cs | "Intel(R) RealSense(TM) SDK C# Wrapper Library" |
| 4 | PBKDFPassworrdHash | #foo MigratorFoo |
| 5 | HashFoo.MigratorFoo | #foo Nhib |
| 6 | HashFoo.Nhib | #foo NHibernate Spatial |
| 7 | HashFoo.Nhib.Spatial | #foo SqlServer |
| 8 | HashFoo.SqlServer | #foo SQLServer Spatial |
| 9 | HashFoo.SqlServer.Spatial | #liveDB Engine |
| 10 | LiveDomain.Core | #SNMP Library |

NuGet Packages()

| Position | ID | Title |
| --- | --- | --- |
| 1 | _Builds | WebsitePackages |
| 2 | 01d60cc9-6e4d-4119-93d3-9634180b8e87 | DaxnetNugetTest |
| 3 | 1 | GraphHopper Importer for .NET |
| 4 | 1.0.0.0 | ITOO.ExamEvalTemplate.Contracts |
| 5 | 1.0.10 | 22 |
| 6 | 1.0.2.4 | Test Class Package |
| 7 | 1.0YprimeID | TitleYprime1.0 |
| 8 | 100 | Custom Template |
| 9 | 1000 | ONE THOUSAND |
| 10 | 101Domain | 101Domain API Client |

Search Priority - 2 Bug

All 3 comments

My beautiful table!

| reaction |
| --- |
| nooooooo! |

Thanks for porting this from email.

You are welcome to make it pretty 馃尫

Was this page helpful?
0 / 5 - 0 ratings