Search matches whole words only, so partial words find nothing. Raised by two co-students reviewing the project, and both are right. `servers/src/search/search.ts` builds the tsquery with: ```ts sql`websearch_to_tsquery('simple', ${query})` ``` That produces lexeme matches on complete words. So: - `radio` does not match Radiohead - `dark sid` does not match "Dark Side of the Moon", because `sid` is not the lexeme `side` Both are the kind of thing a person types while deciding what they are looking for. ## Fix Match on prefixes. Each word in the query should match lexemes that start with it. This is a query-side change only. `search_vector` and the GIN index are unchanged, so there is no migration and no reindex: `to_tsvector` already stores the full lexemes and `: *` seeks against the same index. ## One thing that must not regress The comment above `tsQuery` says why `websearch_to_tsquery` was chosen: it never throws on odd user input. Quotes, dashes and words like `or` are handled as text. `to_tsquery` does throw on all of those. So the query has to be assembled in TypeScript from cleaned tokens, each quoted and suffixed with `:*`, rather than passing user input to `to_tsquery` directly. Whatever is built must keep the property that no input string can make the query fail. ## Cost worth stating in the PR Prefix matching makes every word match more lexemes, and the last word matches the most. Short queries therefore read more of the index. That is the trade for better recall and it is the right one here, but it should be measured against the 100k catalog from #7 rather than assumed, since scalable search is one of the things the README claims. ## Also Two reviewers described this as helping "while typing". It does not: the client commits the query on Search, not per keystroke, since #19. The improvement is for partial words in submitted searches.