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?

Personalized Search at the Speed of Algolia
facebookfacebooklinkedinlinkedintwittertwittermailmail

Search is more than a query and results – search is a conversation your users have with your product. When done right, you feel understood by the engine – and, in turn, the product – which reacts to your needs and adapts to what you’re saying as you’re saying it.

Perhaps one of the most magical moments is when the search engine speaks to you – an individual person, with search results that are catered to your personal tastes and expectations.

“Personalization, yes! But not at the cost of speed.”

One of the core focuses of Algolia is speed. Every time we’ve looked at how other search engines handle personalization, it always came at the cost of speed – we don’t think personalizing the search results makes sense if it makes the search slow. Who wants a slow, personal conversation?

We rolled up our sleeves earlier this year and got to work, and we’re proud today to announce two features that make personalization of search results a breeze, without compromising on the speed Algolia is known for. We call these two API features Optional Filters and Filter scoring – and here’s how it works.

Because the feature can place high demands on CPU performance, it is enabled by default only in our Enterprise plans. If you’re interested in trying it out on your plan, send us a note.

Getting started

Let’s take the example of searching through an index of movies. In this hypothetical website, users can add movies to their “Watch later” list – a familiar feature – and this information is added to the index, in the form of an attribute watch_later with an array of user IDs of every user that adds this movie.

A Sample JSON entry:

{
 "movie_name": "The Karate Kid",
 "genre": "Action",
 "watch_later": ["user42", "user123", "user421", …]
 // …
}

When we search this index, we want movies that are added to a watch list to appear before others.

A regular search would look like:

index.search("karate").then(/* … */)

With personalization, it would work like this:

// `watch_later` needs to be set as a facet in attributesForFaceting
index.search(
 "karate",
 { optionalFilters: ["watch_later:user42"] }
).then(/* … */)

With only one added parameter, suddenly the results are personalized: the search retrieves all the movies related to “karate”, but if a user has added one of the movies related to “karate” to their watch list, this result will show up at the top of the results.

Going further: multiple levels of personalization

What if you want to have multiple layers of personalization? For example, let’s say you’ve analyzed that a user is a huge fan of Action movies, watches a lot of comedies, but is not restricted to these two genres. You’d like the results to first show Action movies, then Comedies, and then the rest of the results. Here’s how you’d do it:

// `genre` needs to be set as a facet in attributesForFaceting
index.search(
 "karate",
 { optionalFilters: ["genre:Action<score=2>", ["genre:Comedy<score=1>"] }
).then(/* … */)

…And you’ll get the results in the order that you expected! We added a new rule called filters in our ranking formula, which will rank the results according to the matching optionalFilters and filters scores.

We’ve been playing around with these features for a few months now, and a few of our customers already use them in production during the beta period, with amazing results.

The best part about these features is how versatile they are: there’s virtually nothing you can’t do when it comes to personalization of results:

  • On a professional social network, retrieving people that are part of your extended network first
  • When searching on a shoe store, displaying brands or categories of products the user has bought from before first
  • In a CRM search, displaying leads I’ve contacted in the past first, or the ones that are assigned to me

If you want to know more about these features, we wrote a guide on personalization. We can’t wait to see what you’ll build with them!

About the author
Nicolas Baissas

Recommended Articles

Powered byAlgolia Algolia Recommend

Search personalization 101: how to capitalize on personalized search and discovery
ux

Catherine Dee

Search and Discovery writer

The (almost) ultimate guide to site search
product

Ivana Ivanovic

Senior Content Strategist

E-commerce personalization: pitfalls, tradeoffs, and solutions
e-commerce

Eunice Lee
Matthew Foyle

Eunice Lee &

Matthew Foyle