Question
Design the indexing layer for a product-catalog search backend that must serve both keyword search ('red running shoes size 10') and semantic/vector similarity ('shoes like this one') over 200M products, with filters (price range, in-stock, category) applied to every query. Target p99 under 100ms, catalog updates ~5k/sec (price/stock changes are frequent), and results must respect real-time stock. Describe the index structures (inverted + vector), how you combine them, how filtering interacts with the indexes, and the central scaling trade-off.
Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.