Design: Search and Filter System
Design covers backend search and filter functionality including data storage, indexing, query processing, and API design. Frontend UI and data ingestion pipelines are out of scope.
Functional Requirements
FR1: Allow users to search items by keywords
FR2: Support filtering results by multiple attributes (e.g., category, price range, rating)
FR3: Return results with low latency (p99 < 300ms)
FR4: Handle up to 5,000 concurrent search requests
FR5: Support pagination of results
FR6: Allow sorting results by relevance or attribute values
Non-Functional Requirements
NFR1: System must be highly available (99.9% uptime)
NFR2: Search results should be consistent within 5 seconds of data updates
NFR3: Support up to 1 million items in the catalog
NFR4: API response size should be limited to 1MB