Skip to content

Feature requests: multi-attribute sorting and case-insensitive sort directions #109

@Robert-K-S

Description

@Robert-K-S

With regard to the sort() function in the Search class, I would like to be able to specify multi-attribute sorting, like so:

$search->sort(['date' => 'DESC', 'attribute2' => 'ASC', 'attribute3' => 'DESC', 'attribute4' => 'ASC']);

It appears that the current code only allows for specifying sorting by one attribute, or by multiple attributes but all with the same sort direction.

It also appears that specifying the sort direction ('ASC' or 'DESC') as anything other than all-lowercase results in an error. It would be preferable to be able to specify these in uppercase, consistent with SQL conventions.

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