Search
Question-first search — answer cards, not just links. Postgres FTS + pg_trgm. Alias/typo tolerant.
2 results for “Grotti Cheeta” — answer cards first.
guidegrotti-cheetah-top-speed-ps5-1-03
Grotti Cheetah — Top Speed 132.4 mph (REPRODUCED, PS5 1.03)
See evidence & history →title_fts:0.50 · title_partial:0.50
entitygrotti-cheetah
Grotti Cheetah
See evidence & history →title_fts:0.50 · title_partial:0.50
How search works
Postgres
full-text search + pg_trgm (trigram) with alias expansion. Query is matched against title, body, and entity_aliases; typo tolerance via similarity() ≥ 0.3 (tunable via CONFIG_KV search:trigram_threshold). Ranking: FTS rank × trigram bonus × alias bonus, deterministic tie-break by slug. Index updates are async via QUEUE_SEARCH_INDEX (60s SLA). No external vendor (Typesense/Algolia/etc.) and no AI free-association.Postgres SQL template is in
src/lib/search.ts:POSTGRES_SEARCH_SQL and src/app/api/search/route.ts; in-memory fixtures mirror it for local dev/tests without Hyperdrive.