Career exploration session — Grade 9
Rohan Mehta was engaged today. We explored their interest in architecture, discussing pathway options at the intersection of curiosity
Postgres full-text search over counselling reports, ranked by relevance. Filter by school, grade, or report kind.
Rohan Mehta was engaged today. We explored their interest in architecture, discussing pathway options at the intersection of curiosity
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.