Surface vocabulary terms as the user types.
Approach
- Build a trie from
document_freqs keys at startup — no reindexing needed
- Expose a
/suggest?prefix=<str> endpoint returning the top N matches
- Hook into the frontend search input with a debounced fetch, showing results in a dropdown
Notes
- Prefix lookup is O(k) where k = query length
- Trie construction happens once at server startup alongside the existing index load
Surface vocabulary terms as the user types.
Approach
document_freqskeys at startup — no reindexing needed/suggest?prefix=<str>endpoint returning the top N matchesNotes