Prefix lookup is only half the product#
For san fr…, users expect low-latency suggestions such as San Francisco, its airport, and weather. A database prefix query can serve smaller scale; high-QPS serving may justify a dedicated prefix index, precomputed popular queries, caches, and distributed replicas.
Rank from product-approved signals such as frequency, recency, locale, or personalization. Batch refresh is simpler but stale; streaming refresh is fresher but adds state and operational complexity. A trie or FST-style structure helps lookup but does not solve ranking, updates, abuse, or distribution.
Use these prompts to extend the design. The useful answer is a reasoned change, not a memorized sentence.
- How quickly must new suggestions appear?
- How are unsafe or deleted suggestions removed?
- How does locale change ranking?
- What is cached by prefix?
Related practice problems
Use the manifest-backed prompts below to apply this lesson in a complete design.
- Clusters, nodes, and shardsElastic Documentation