Career exploration session — Grade 10
Anvi Reddy was engaged today. We explored their interest in civil services, discussing pathway options at the intersection
Postgres full-text search over counselling reports, ranked by relevance. Filter by school, grade, or report kind.
Anvi Reddy was engaged today. We explored their interest in civil services, discussing pathway options at the intersection
Every reports.text and counsellor_note is indexed by Postgres tsvector (english config). One GIN index, refreshed on insert.
Search box runs plainto_tsquery + ts_rank_cd. Filter chips (school, grade, RIASEC, kind) compose into the same SQL — no client-side filtering.
ts_headline wraps matches in <mark> tags so counsellors see the evidence in context.
Top 30 sorted by rank × recency. The aim is < 200 ms server-side on the full corpus, no Elasticsearch needed.