Mercadona, the Spanish retail giant, has built its own internal search engine using Claude Code, replacing Algolia and achieving significant improvements in quality and cost. The online store processes 4.4 million searches per week, and the new search engine has boosted ranking quality by 85% while eliminating zero-result searches.
Why Mercadona Built Its Own Search Engine
For eight years, Mercadona relied on Algolia, a search service used by companies like Sephora and LVMH. However, the search function is critical: it drives 30-35% of products added to the cart. The cost was also a factor, with Algolia charging between $9,000 and $15,000 per month.
José Ramón Pérez Agüera, CTO of Mercadona Tech, had been considering building an in-house solution for years. The tipping point came when he realized he could leverage AI to accelerate development.

How Claude Code Enabled a Weekend Build
Pérez Agüera built 70% of the new search engine over a long weekend, using Claude Code. In a LinkedIn post and interview with Goldman Media, he explained that the core implementation, search quality improvements, and foundational work took just three days.
Claude Code, an AI-powered coding assistant, allowed him to rapidly prototype and deploy the search engine. This dramatic reduction in development time showcases how AI tools can empower even small teams to undertake complex projects.
Key Results: Quality, Speed, and Cost Savings
The new search engine delivered impressive outcomes. Ranking quality improved by 85%, and zero-result searches—previously 4% of all queries—were completely eliminated. Monthly costs dropped from $9,000-$15,000 to under $900, a savings of 90-94%.
These improvements directly impact the bottom line, as better search leads to more products added to the cart and higher customer satisfaction. The background to this story is set out in AI Builds Custom Eclipse Map for Madrid Viewers. A related thread runs through Anthropic Builds Custom AI Chips to Power Claude and Cut Costs. Earlier coverage in AI Coding Tools Like Claude Code Turn Developers Into Enter-Key Pushers shows how the argument developed.
- 85% better ranking quality compared to the previous system.
- Zero zero-result searches, down from 4% of all queries.
- 90-94% cost reduction, from up to $15,000 to under $900 per month.
- 70% of the work done in three days by one engineer using Claude Code.
- Search drives 30-35% of cart additions, making it a critical business component.
Comparing Old and New Search Systems
| Metric | Algolia (Old) | Custom Search (New) |
|---|---|---|
| Monthly Cost | $9,000 - $15,000 | Under $900 |
| Ranking Quality | Baseline | 85% improvement |
| Zero-result Searches | 4% of queries | 0% |
| Development Time | N/A | 3 days for 70% of work |
| Search Volume | 4.4M per week | 4.4M per week |
What This Means for the Future of Search
Mercadona's success demonstrates that building a custom search engine is no longer a massive undertaking. With AI tools like Claude Code, companies can achieve better performance at a fraction of the cost. A closer look at the same subject appears in ChatGPT in Spain Grows as a Search Engine, Not a Writer. Anyone following the wider picture can start with DIY Dresser Guide: How to Build Your Own Custom Storage. The same theme surfaces in Raspberry Pi Cyberdeck Guide: Build Your Own Custom Portable PC, which takes a different angle.
This shift could disrupt the search-as-a-service market, as more businesses consider in-house solutions. It also highlights the growing role of AI in software development, enabling rapid innovation. Context on how this played out before sits in EU Regulates ChatGPT as a Search Engine Under DSA. A companion piece, New Search Engine Simplifies Public Contract Tracking in Spain, approaches the same subject from another angle.
FAQ
What is Claude Code?
Claude Code is an AI-powered coding assistant developed by Anthropic. It helps developers write, debug, and deploy code more efficiently by providing intelligent suggestions and automating repetitive tasks.
How did Mercadona reduce costs by over 90%?
By replacing Algolia's subscription service with a custom-built search engine, Mercadona eliminated licensing fees. The new system runs on their own infrastructure, costing under $900 per month compared to up to $15,000.
What was the role of AI in building the search engine?
Claude Code enabled the CTO to rapidly implement and refine the search engine. It provided code suggestions and accelerated development, allowing 70% of the work to be completed in just three days.
What are zero-result searches and why do they matter?
Zero-result searches occur when a user's query returns no products, leading to frustration and lost sales. Mercadona's new engine eliminated these entirely, improving user experience and capturing more potential purchases.