Skip to content

[mi/es2] sort behavior #1695

@mickeyn

Description

@mickeyn

we need to investigate how to fix 'sort' behavior in queries for ES 2.3.
in t/model/release.t there's an assumption that a query (that lives in Model::API::Release::modules) with a sort => [ 'documentation', 'path' ] will give the same results of the equivalent Perl sorting:

sort {  $a->{documentation} cmp $b->{documentation}
             or $a->{path} cmp $b->{path}  }

which is not the case:

  1. when elements have no value they are not placed at the front like in Perl
  2. the result sorting of ['HTTP::CookieMonster::Cookie','HTTP::CookieMonster'] from ES comes back as: 'HTTP::CookieMonster::Cookie','HTTP::CookieMonster and not the other way around like in Perl.

@clintongormley - any pro tips?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions