Skip to content

Allow search API results to be sorted by department course numbers #195

@mbertrand

Description

@mbertrand

User Story

When searching for resources, the user should be able to sort results by course number if desired. When a department is selected, the sort should apply only to courses within that department.

Description/Context

sort_coursenum was added to indexed course documents in #173. The search API should allow sorting on that field if specified in query parameters.

This is a port of existing functionality from open-discussions.

Acceptance Criteria

  • Search results for courses ordered by sort_coursenum if query parameter is passed.
  • Search results for courses ordered by sort_coursenum only within selected department(s) if any.

Plan/Design

  • Add an optional query parameter that the search API accepts to sort by sort_coursenum, ascending or descending.
  • Make sure the option is documented in the API schema

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