Instacart Consolidates Search Infrastructure on Postgresql, Phasing Out Elasticsearch
Briefly

Instacart Consolidates Search Infrastructure on Postgresql, Phasing Out Elasticsearch
"A key part of the redesign was improving how results are retrieved. Traditional keyword search excels at matching exact product attributes, for example, a query like "pesto pasta sauce 8oz" benefits from precise lexical matching. But broader intent-driven queries, such as "healthy foods", are better handled through semantic retrieval, which understands relationships between terms and concepts. By combining both approaches in Postgres, Instacart can balance precision (returning only relevant results) with recall (capturing as many relevant items as possible), ensuring that customers see both the exact products they're looking for and meaningful options for discovery."
"According to the Instacart engineering team, the migration improved development velocity by removing the need to reconcile data between systems. The hybrid infrastructure also provided greater flexibility in handling dynamic inventory and complex user preferences, enabling the platform to process millions of search requests daily. Real-time updates to prices, availability, and discounts are reflected instantly, supporting a more efficient and personalized shopping experience for customers."
"A normalized data model allowed us to achieve a 10x reduction in write workload compared to the denormalized data model we used in Elasticsearch. This resulted in nearly 80% savings on storage and indexing costs, reduced dead-end searches, and improved the overall customer experience."
Instacart redesigned its search infrastructure by replacing Elasticsearch with PostgreSQL and consolidating catalog and search data into a single Postgres system. The system combines keyword (lexical) matching and embedding-based semantic retrieval to handle exact attribute queries and broader intent-driven queries. The hybrid approach balances precision and recall, returning precise product matches while enabling discovery of relevant items. Consolidation simplified operations, eliminated cross-system synchronization, and improved development velocity. The infrastructure supports real-time updates to prices, availability, and discounts, accommodates dynamic inventory and complex user preferences, and scales to process millions of daily search requests.
Read at InfoQ
Unable to calculate read time
[
|
]