John Lewis & Partners

The art of cloud search: How John Lewis & Partners led the way

How cloud search saved money and increased revenue

In 2018, high street retailer John Lewis & Partners took the bold step to increase their leverage of the cloud and embrace new ways of working. Search was identified as a complex yet discrete proving ground for that strategy. The plan was to move search to microservices and Elasticsearch, and replace the existing search system. This would save significant licensing and maintenance costs. John Lewis & Partners figured if they could achieve faster, sustainable delivery, and make support easier through the peak trading period of Black Friday, the outcome would be more than just a new search service. It would enable the launch of a new search algorithm that would be financially beneficial.

This case study is also available as a PDF

  • 100%

    Average Black Friday availability with a 0.1s average response time.

  • £30m

    Estimated extra revenue in the first 12 months as a result of the new algorithm.

  • 30%

    Increase in customer add to cart rates since implementation.

About John Lewis & Partners

John Lewis & Partners is one of Britain’s oldest, largest, and most popular retailers. John Lewis & Partners operates 42 stores across the UK, as well as johnlewis.com. The company is part of the John Lewis Partnership, which is co-owned by its 38,000 employees, and is renowned for its exceptional customer service.

  • Industry

    Industry icon

    Retail

  • Organisation size

    Organisation icon

    38,000 employees

  • Location

    Location icon

    UK

  • Services provided

    Services icon

    Decide, Deliver

Starting small

In spring 2018, a small, hand-picked team started a period of 6 weeks discovery. Their brief was simple. How could John Lewis & Partners migrate search away from the old system and enable legacy decommissioning, using lean, agile practices. For a traditional retailer, this approach was new, empowering, and exciting.

The decision was to go live to a small percentage of customers with a very basic version of search, and then iteratively add more features. They knew that as soon as they did go live, they would start to learn about the system’s characteristics and how customers used it.

Building a team for success

During Discovery the team grew and took shape. This was a combination of permanent staff from JL&P and consultants from Equal Experts.

Communicating with operational stakeholders was an essential component of ensuring success. People from Operations and Middleware were co-opted, and aligned with the team from the outset. Taking time out early to agree on ways of working was time well spent.

The team wanted to have just enough process to deliver reliably without overheads.
Very importantly, the whole team was responsible for quality. To do this they embraced continuous delivery, employed kanban-style working with a strict standup and ticket discipline. The team was the first to adopt You Build It You Run It at John Lewis & Partners, and first to use the Paved Road on the John Lewis & Partners Digital Platform (JLDP).

The team started with three microservices, and one Elasticsearch cluster. This more than doubled, with new microservices being added when it was obvious a technical challenge was becoming a separate capability.

Peak 2018 at 1%

When there are events and reasons to celebrate, people go shopping. The biggest event for John Lewis & Partners is often referred to as The Peak. This includes Black Friday in late November, the run-up to Christmas, and the Boxing Day sale.

Peak planning meant debating many potential disaster scenarios. The incumbent search API was still available and, because the new API format was the same, it was easy to direct traffic to either API without impact on customers. This was done using an A/B testing tool, and 1% of customers used cloud search on Black Friday.

The performance had been tested to way beyond 1%, so it wasn’t surprising that the service coped. It was good to know there was the capability to scope up if needed, as the existing search system was known to periodically struggle under load.

Tuning search

The higher the traffic, the faster you learn. By summer 2019, cloud search was at 100% live traffic and tuning was underway. Tuning is hard because you need to understand what the customer was thinking when they typed in multiple, seemingly unconnected words. Many different approaches were tried, including weighting fields differently, using synonyms, and stemming. The team was releasing changes daily to production, which enabled a lot of experimentation.

Now using data science to inform ranking algorithms, a data scientist and machine learning expert joined the team. The flexible architecture meant it was easy to ingest new data from new sources. This data would be run through the team’s data pipelines, analysing and processing it, to provide near-real-time customisation of search engine behaviour.

Peak 2019 at 100%

For Black Friday 2019, the fallback to legacy search was no longer a viable option, and there were questions about You Build It You Run It. How would issues be dealt with, and what was the target response time for an incident? Keeping operational stakeholders closely involved was a priority. The team worked on its performance testing, monitoring, and alerting, until they had complete confidence.

The average uptime across Black Friday, Christmas, and Boxing Day sales was 100%, and Cloud Search API response times were consistently good at 0.1s average, and 0.3s at 95th percentile. With a search dashboard up in the office, everyone got used to seeing it at standup and reviewing it quickly for any anomalies.

Building into the future

The last bit of functionality to move off the legacy search was typeahead suggestions which were released in January 2020. This cleared the way for decommissioning the legacy search system.

After more than a year of iterating ranking algorithms and refining A/B testing techniques, a simple algorithm produced significant and consistent lifts in important metrics like conversion and revenue per session. John Lewis & Partners has estimated the new algorithm will bring in over £30m in extra revenue per year.

Machine Learning is now applied to search results and makes turnaround for A/B testing much quicker. Over 100 A/B tests have been run to continually identify opportunities for search improvements.

When the pandemic hit in March 2020 and shops closed, online shopping doubled overnight. The search team handled this without any problems, and they’re still going strong in 2022. They’ve averaged daily deployments for over 2 years, with an incident rate much lower than the legacy search system.

The seismic online shift in retail has been accelerated by the pandemic and the search transformation has underpinned John Lewis’ ability to adapt.

I’d like to take the opportunity to thank the search team for building an amazing service

Product Lead at John Lewis & Partners

Want to know more?

Are you interested in this project? Or do you have one just like it? Get in touch. We'd love to tell you more about it.