Feature: Search Feature Implementation (FEAT-58)
Metadata
- Issue ID: FEAT-58
- Status: Done
- Owner: Kzu0-afk
- Related PRs: TBD
- Canonical feature doc:
docs/features/FEAT-58-Search-Feature-Implementation.md
Overview
FEAT-58 improves search and ranking quality across discovery surfaces:
- Explore page
- Institutions directory
- Courses directory
- Documents directory
The objective is stronger discoverability and monetization support while preserving relevance, stability, and SEO-friendly behavior.
Frontend Behavior
- Uses URL-driven search state (
q,sort,page) on directory pages for shareability and crawl consistency. - Keeps entity-specific search + sort controls with clear empty-result and fallback states.
- Preserves active filters across pagination links.
- Maintains current Explore-page strategy:
- lightweight client-side filter for preloaded cards in v1;
- deeper backend-powered search integration planned for follow-up phase.
- Allows optional local persistence only for non-sensitive UX preferences (recent query/sort context), with URL state remaining authoritative.
Backend Behavior
- Existing catalog APIs already support paginated query + sort:
GET /institutionsGET /coursesGET /documents- plus scoped variants (
/institutions/:slug/courses,/courses/:slug/documents)
- Ranking/signals currently used:
- documents: quality, downloads, views, trending/engagement, topic tags
- courses: popularity, document depth, trending
- institutions: course/document breadth and location/name relevance
- FEAT-58 planning includes continued relevance tuning, deterministic tie-breakers, and bounded query behavior.
QA Test Scenarios
| Scenario ID | Description | Steps | Input | Expected Result |
|---|---|---|---|---|
| FEAT-58-01 | Happy-path document search | Open /documents, search for known term | q=<known term> | Relevant items appear with stable sorting/pagination |
| FEAT-58-02 | Validation fallback sort | Force unsupported sort value | sort=unknown | API/UI falls back safely to default sort |
| FEAT-58-03 | Backend failure handling | Simulate upstream/API failure | n/a | Page shows resilient fallback state, no crash |
| FEAT-58-04 | Edge no-match state | Search nonexistent query | q=<nonexistent> | User sees clear no-results state |
For the full scenario matrix and detailed QA notes, see:
docs/features/FEAT-58-Search-Feature-Implementation.md
Edge Cases
- Long or symbol-heavy queries.
- Query/sort persistence across pagination transitions.
- URL vs localStorage preference mismatch (URL wins).
- Ranking drift when engagement signals update between page loads.
- Explore-page partial preload vs deep catalog search expectations.
Notes
- This SBDocs page is a compact index view; the canonical implementation details remain in the FEAT-58 feature doc.
- No mock/placeholder search data is introduced.
- No auth/session model changes are part of FEAT-58 search scope.