Search by Algolia
Feature Spotlight: Query Rules
product

Feature Spotlight: Query Rules

You’re running an ecommerce site for an electronics retailer, and you’re seeing in your analytics that users keep ...

Jaden Baptista

Technical Writer

An introduction to transformer models in neural networks and machine learning
ai

An introduction to transformer models in neural networks and machine learning

What do OpenAI and DeepMind have in common? Give up? These innovative organizations both utilize technology known as transformer models ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

What’s the secret of online merchandise management? Giving store merchandisers the right tools
e-commerce

What’s the secret of online merchandise management? Giving store merchandisers the right tools

As a successful in-store boutique manager in 1994, you might have had your merchandisers adorn your street-facing storefront ...

Catherine Dee

Search and Discovery writer

New features and capabilities in Algolia InstantSearch
engineering

New features and capabilities in Algolia InstantSearch

At Algolia, our business is more than search and discovery, it’s the continuous improvement of site search. If you ...

Haroen Viaene

JavaScript Library Developer

Feature Spotlight: Analytics
product

Feature Spotlight: Analytics

Analytics brings math and data into the otherwise very subjective world of ecommerce. It helps companies quantify how well their ...

Jaden Baptista

Technical Writer

What is clustering?
ai

What is clustering?

Amid all the momentous developments in the generative AI data space, are you a data scientist struggling to make sense ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

What is a vector database?
product

What is a vector database?

Fashion ideas for guest aunt informal summer wedding Funny movie to get my bored high-schoolers off their addictive gaming ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Unlock the power of image-based recommendation with Algolia’s LookingSimilar
engineering

Unlock the power of image-based recommendation with Algolia’s LookingSimilar

Imagine you're visiting an online art gallery and a specific painting catches your eye. You'd like to find ...

Raed Chammam

Senior Software Engineer

Empowering Change: Algolia's Global Giving Days Impact Report
algolia

Empowering Change: Algolia's Global Giving Days Impact Report

At Algolia, our commitment to making a positive impact extends far beyond the digital landscape. We believe in the power ...

Amy Ciba

Senior Manager, People Success

Retail personalization: Give your ecommerce customers the tailored shopping experiences they expect and deserve
e-commerce

Retail personalization: Give your ecommerce customers the tailored shopping experiences they expect and deserve

In today’s post-pandemic-yet-still-super-competitive retail landscape, gaining, keeping, and converting ecommerce customers is no easy ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Algolia x eTail | A busy few days in Boston
algolia

Algolia x eTail | A busy few days in Boston

There are few atmospheres as unique as that of a conference exhibit hall: the air always filled with an indescribable ...

Marissa Wharton

Marketing Content Manager

What are vectors and how do they apply to machine learning?
ai

What are vectors and how do they apply to machine learning?

To consider the question of what vectors are, it helps to be a mathematician, or at least someone who’s ...

Catherine Dee

Search and Discovery writer

Why imports are important in JS
engineering

Why imports are important in JS

My first foray into programming was writing Python on a Raspberry Pi to flicker some LED lights — it wasn’t ...

Jaden Baptista

Technical Writer

What is ecommerce? The complete guide
e-commerce

What is ecommerce? The complete guide

How well do you know the world of modern ecommerce?  With retail ecommerce sales having exceeded $5.7 trillion worldwide ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Data is king: The role of data capture and integrity in embracing AI
ai

Data is king: The role of data capture and integrity in embracing AI

In a world of artificial intelligence (AI), data serves as the foundation for machine learning (ML) models to identify trends ...

Alexandra Anghel

Director of AI Engineering

What are data privacy and data security? Why are they  critical for an organization?
product

What are data privacy and data security? Why are they critical for an organization?

Imagine you’re a leading healthcare provider that performs extensive data collection as part of your patient management. You’re ...

Catherine Dee

Search and Discovery writer

Achieving digital excellence: Algolia's insights from the GDS Retail Digital Summit
e-commerce

Achieving digital excellence: Algolia's insights from the GDS Retail Digital Summit

In an era where customer experience reigns supreme, achieving digital excellence is a worthy goal for retail leaders. But what ...

Marissa Wharton

Marketing Content Manager

AI at scale: Managing ML models over time & across use cases
ai

AI at scale: Managing ML models over time & across use cases

Just a few years ago it would have required considerable resources to build a new AI service from scratch. Of ...

Benoit Perrot

VP, Engineering

Looking for something?

facebookfacebooklinkedinlinkedintwittertwittermailmail

The search result a user sees usually hides a lot of underlying data.

Take this Amazon search result:

This search result already contains a lot of data, but that’s absolutely not everything that Amazon has on this blender. Where’s the department or category that this item falls into? You can filter by that on the Amazon site, so that information is definitely attached to the search result; it’s just not displayed.

Same goes for the brand: it’s part of the title in the displayed part of the search result, but we can filter by it, so it must be stored as a separate field in their search index. 

While we don’t always show every piece of data that’s technically included in the search result, we still need that data there! When we use it to power faceted search, though, we run into a new problem: what if there are more options for that facet than we can easily display in our UI? Algolia will automatically send us the first few with our first request, but in the blender example, I counted 26 different brands that Amazon’s UI has to allow me to filter by.

To tackle this problem, we released a new feature in March 2017 that lets you search for facet values. This gives you the power to explore and actually use those undisplayed values and deliver on your promise to help users cut through the noise and find what they’re looking for. 

See it in action: redoing TED search

To demonstrate this feature, we built a brand new demo based on TED talks. In this search, we have set filters based on events, the kind of conference (original, TEDx, and so on), topics and languages. Each of those filters contains more entries than we can display, which makes them perfect for using search for facet values.

Ted video search demo

Behind the scenes

Until the addition of Algolia’s search for faceted values, implementing this feature meant extra work preprocessing the data. For each faceted attribute, you had to build (and maintain) a dedicated index with the occurrences of the elements. This index had to be kept up to date, as records were added, deleted, or updated.

But not anymore! Our new functionality only requires two elements:

  • Configure the facet to be searchable: searchable(attribute) instead of attribute in the attributesForFaceting
  • Use the new method of the API to actually search in the values

This new feature added to our API is available in all our API clients using the method called searchForFacetValues(), as well as in the JS Helper. That method accepts a specific query to specify the search and the whole set of filters that you can send to index queries. This allows the search for facet values to be contextualized. This filters the values to only those that make sense for the current query.

For example, when searching for blenders on Amazon, a feature like this prevents us from getting facet suggestions like “Keurig” or “Roomba” or “Bose”. While those brands definitely do have products on Amazon, it’d be ridiculous to show those brand options when your user is searching for blenders.

Baked in our widgets

A feature isn’t useful unless it’s easy to use. Since we provide an end-to-end developer experience from the REST API to the UI, we wanted to implement the searchable refinement list right in our widget libraries instantsearch.js and react-instantsearch.

When I first looked at LinkedIn’s implementation of this facet search, something didn’t seem quite right. It felt like the feature was too hidden, like the space could be used more efficiently. We prototyped two versions of the search refinement list and we ended up with two simple implementations that we tested internally:

 

We then conducted a study with those two prototypes, and it turned out that for us the second version was the best. That was especially true for those who had no prior knowledge of the LinkedIn implementation.

This implementation is now available to you directly in instantsearch.js and in react-instantsearch. It is not a new widget, just a new option in the refinement list which will transform the list into a search one. But even that’s only scratching the surface – imagine going beyond the default implementation and integrating it right into the search box itself, like how Slack’s message box lets you refine facets while writing your message.

There’s so much more you can do with this, so if you’d like to learn more about how to get started with faceted search, check out our guides for InstantSearch and filtering/faceting.

We’re looking forward to seeing what you build with it!

About the author
Alexandre Stanislawski

Think outside the (search) box

Innovative user experiences for improving e-commerce conversion rates

Discover more
Ebook
Ebook

Recommended Articles

Powered byAlgolia Algolia Recommend

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

Julien Lemoine

Co-founder & former CTO at Algolia

Harnessing API’s with React: a different approach
engineering

Alexandre Stanislawski

Bringing Algolia’s faceting experience to mobile–the evolution of AppApp
customers

Guillaume Dumortier