Search is retrieval and ranking, not only substring matching#
LIKE '%wireless headphones%' may be acceptable for a small catalog, but a search product often needs tokenization, multiple fields, relevance, typo handling, filters, and highlighting. Those requirements motivate a derived retrieval index.
| Primary database | Search index |
|---|---|
| Authoritative state and transactions | Token-based retrieval and relevance |
| Point and range access paths | Text fields, filters, facets, highlighting |
If indexing falls behind, search can temporarily return stale products. Define freshness, replay, repair, and deletion behavior; cross-link the CDC and outbox patterns instead of duplicating them.
Related practice problems
Use the manifest-backed prompts below to apply this lesson in a complete design.
- Clusters, nodes, and shardsElastic Documentation