Search by Algolia
Introducing new developer-friendly pricing
algolia

Introducing new developer-friendly pricing

Hey there, developers! At Algolia, we believe everyone should have the opportunity to bring a best-in-class search experience ...

Nick Vlku

VP of Product Growth

What is online visual merchandising?
e-commerce

What is online visual merchandising?

Eye-catching mannequins. Bright, colorful signage. Soothing interior design. Exquisite product displays. In short, amazing store merchandising. For shoppers in ...

Catherine Dee

Search and Discovery writer

Introducing the new Algolia no-code data connector platform
engineering

Introducing the new Algolia no-code data connector platform

Ingesting data should be easy, but all too often, it can be anything but. Data can come in many different ...

Keshia Rose

Staff Product Manager, Data Connectivity

Customer-centric site search trends
e-commerce

Customer-centric site search trends

Everyday there are new messages in the market about what technology to buy, how to position your company against the ...

Piyush Patel

Chief Strategic Business Development Officer

What is online retail merchandising? An introduction
e-commerce

What is online retail merchandising? An introduction

Done any shopping on an ecommerce website lately? If so, you know a smooth online shopper experience is not optional ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

5 considerations for Black Friday 2023 readiness
e-commerce

5 considerations for Black Friday 2023 readiness

It’s hard to imagine having to think about Black Friday less than 4 months out from the previous one ...

Piyush Patel

Chief Strategic Business Development Officer

How to increase your sales and ROI with optimized ecommerce merchandising
e-commerce

How to increase your sales and ROI with optimized ecommerce merchandising

What happens if an online shopper arrives on your ecommerce site and: Your navigation provides no obvious or helpful direction ...

Catherine Dee

Search and Discovery writer

Mobile search UX best practices, part 3: Optimizing display of search results
ux

Mobile search UX best practices, part 3: Optimizing display of search results

In part 1 of this blog-post series, we looked at app interface design obstacles in the mobile search experience ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Mobile search UX best practices, part 2: Streamlining search functionality
ux

Mobile search UX best practices, part 2: Streamlining search functionality

In part 1 of this series on mobile UX design, we talked about how designing a successful search user experience ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Mobile search UX best practices, part 1: Understanding the challenges
ux

Mobile search UX best practices, part 1: Understanding the challenges

Welcome to our three-part series on creating winning search UX design for your mobile app! This post identifies developer ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Teaching English with Zapier and Algolia
engineering

Teaching English with Zapier and Algolia

National No Code Day falls on March 11th in the United States to encourage more people to build things online ...

Alita Leite da Silva

How AI search enables ecommerce companies to boost revenue and cut costs
ai

How AI search enables ecommerce companies to boost revenue and cut costs

Consulting powerhouse McKinsey is bullish on AI. Their forecasting estimates that AI could add around 16 percent to global GDP ...

Michelle Adams

Chief Revenue Officer at Algolia

What is digital product merchandising?
e-commerce

What is digital product merchandising?

How do you sell a product when your customers can’t assess it in person: pick it up, feel what ...

Catherine Dee

Search and Discovery writer

Scaling marketplace search with AI
ai

Scaling marketplace search with AI

It is clear that for online businesses and especially for Marketplaces, content discovery can be especially challenging due to the ...

Bharat Guruprakash

Chief Product Officer

The changing face of digital merchandising
e-commerce

The changing face of digital merchandising

This 2-part feature dives into the transformational journey made by digital merchandising to drive positive ecommerce experiences. Part 1 ...

Reshma Iyer

Director of Product Marketing, Ecommerce

What’s a convolutional neural network and how is it used for image recognition in search?
ai

What’s a convolutional neural network and how is it used for image recognition in search?

A social media user is shown snapshots of people he may know based on face-recognition technology and asked if ...

Catherine Dee

Search and Discovery writer

What’s organizational knowledge and how can you make it accessible to the right people?
product

What’s organizational knowledge and how can you make it accessible to the right people?

How’s your company’s organizational knowledge holding up? In other words, if an employee were to leave, would they ...

Catherine Dee

Search and Discovery writer

Adding trending recommendations to your existing e-commerce store
engineering

Adding trending recommendations to your existing e-commerce store

Recommendations can make or break an online shopping experience. In a world full of endless choices and infinite scrolling, recommendations ...

Ashley Huynh

Looking for something?

Algolia Coding Challenge: Find out the solutions 🔎
facebookfacebooklinkedinlinkedintwittertwittermailmail

Thanks to all of those that helped Santa by participating in our ❄️  2021 Coding Challenge ❄️  for the Holiday season!

Congratulations to everyone who submitted answers, but especially to our prize winner – Ruben Quintero! 🥳

For the rest of this post, I’ll be walking through solutions for each of the challenges using Ruben’s repositories as examples.

Let’s get started!

Challenge #1 🎤

Santa is a huge Star Trek fan. He remembers his favorite Star Trek actor once gave a Ted talk with an inspiring rating between 800 and 900 that was tagged storytelling.

What is the name of the speaker, (who is also a famous Star Trek actor), that Santa is going to visit?

The Ted Talks data set has several interesting attributes for faceting. The trick here is choosing which ones to facet (tags and inspiring_rating).

For this solution, Ruben uses the InstantSearch library for vanilla JS. A searchable RefinementList allows Santa to find the “storyteller” tag while a RangeInput filter allows him to set the appropriate range for the insipiring_rating.

We narrow the search down to two records, one of which is George Takei, who was an actor on the original Star Trek series (hurray for Sulu!).

Bonus Question

What is the most viewed TED Talk tagged for both collaboration and society?

 “How to spot a liar”

Challenge #2 📽

As he prepares for his trip Santa remembers that little Bryan, one of the children on his “nice” list, has asked for a movie that stars both the actor he plans to visit and the actress Amy Poehler. Santa needs another search interface to find the title of this movie (and when it was released).

What is the title and release year of the movie that Bryan wants for Christmas? (Submit via Form)

The Movies data set is too large for the Algolia free tier, so we need to use a hosted version. It’s important to remember that much of the configuration around faceting and relevance occurs within the index itself, not in the query. Since we don’t manage this index, we need to use the facets and searchable attributes as configured.

For this solution, Ruben again uses a searchable RefinementList for actors. This makes it very easy to find the movie “Free Birds” released in 2013. Ruben adds a RefinementList for genres and a Menu of release years to solve the bonus question.

Bonus Question

What is the title and score of the highest rated movie with the genre Crime released in 2008? 

7.88854034451496 for “The Dark Knight”

Challenge #3 🍷

What is the name of the Bordeaux wine from the Fronsac domain released in the same year as the movie in Challenge #2?

We start with the Wine data set, which suffers from some duplicate record issues. Each wine is in the data set 16 times! As Bryan and I discovered doing this challenge live, we need to de-dupe the data as we import it into the index.

Once the data is normalized, we just need to add a couple of RefinementLists for year and domain to discover the only wine from the Fronsac region bottled in 2013 is Chateau Vrai Canon Bouche.

Bonus Question

What was the highest rated wine under $30 from 2010?

Chateau Ferran

Challenge #4 🛩

Wine in hand, Santa is ready to start his journey. But where? He knows his favorite Star Trek actor recently made the following flights:

  • ATL → SEA
  • AHN → LGA
  • JFK → MCN

What is the major US city closest to all three flights listed above?

For this challenge, we use the Airports data set, but we need to combine it with map data to answer the question. Ruben chose to use the InstantSearch geoSearch widget. This widget uses the Google Maps APIs to render map data. But we can also use a custom connector for other mapping APIs.

Filtering on the airport codes above, we discover that although there are two well-known airports near New York City (LGA and JFK), there are actually three airports near Atlanta, GA (ATL, AHN, and MCN) making that the best answer.

Bonus Question

What is the closest airport to Carson National Forest in the United States?

Los Alamos Airport (LAM)

Challenge #5 🎸

Santa remembers another gift he still needs to pick up for a girl on his “nice” list. All little Julie wanted for Christmas were tickets to see the musician that played in that same city sometime between August 14 and August 18, 2019.

What was the name of the artist Julie wants to see for Christmas?

The Concert data set is again too large for the Algolia free tier, so we need to use the hosted version. This challenge is all about dates. As Bryan and I discovered in our live coding session, dates are hard.

Algolia indices store dates as Unix timestamps for filtering and ranking. We need to build an interface that makes it easier for humans to deal with these dates. We chose to use a date range picker from the Algolia Code Exchange. From there, it was just a few filters to find out the artist was Grimes playing at Cellairis Amphitheatre at Lakewood, Atlanta, GA.

Bonus Question

What was the last city where the band Coldplay performed in 2018?

Paris, France

Conclusion 🎄

Thanks to all of the amazing participants in the winter Coding Challenge. We’ll be keeping the Discord server up, so let us know if you want access. Even though the contest is over, these are still fun challenges to try to build on your own.

Happy holidays from all of us at Algolia and we’ll see you in the New Year! 🎊

Check out related solutions on our open source code exchange platform.

About the author
Chuck Meyer

Sr. Developer Relations Engineer

githubtwitter

Recommended Articles

Powered byAlgolia Algolia Recommend

Algolia Coding Challenge: Help Santa get inspired! 🎅
engineering

Julie Reboul
Chuck Meyer

Julie Reboul &

Chuck Meyer

Inside the Engine Part 8: Handling Advanced Search Use Cases
engineering

Julien Lemoine

Co-founder & former CTO at Algolia

A search inside a search: how we brought Inception to Algolia
product

Alexandre Stanislawski