Skip to content

Extend the existing search API request handlers to support result sorting #49

@JoseSzycho

Description

@JoseSzycho

Summary

Extend the existing search API request handlers to support result sorting. This enhancement must allow users to specify sort criteria when performing full-text searches. The endpoint should:

  • Accept sorting parameters alongside the search query.
  • Validate requested sort fields and directions against an allowlist.
  • Execute the search against Meilisearch with the appropriate sort configuration.
  • Return sorted results immediately.

Important

Sorting must apply strictly to full-text search results. Field-based filtering remains out of scope for this effort and will be addressed in a future release.

Acceptance Criteria

  • Users must be able to search resources.
  • Users must be able to paginate results using cursor-based pagination.
  • Users must be able to sort results by supported fields.
  • Users must be able to specify sort direction (asc or desc).
  • The API must reject unsupported or invalid sort fields with appropriate validation errors.
  • Sorting must be deterministic and compatible with cursor-based pagination.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions