Concepts / Managing results / Relevance overview
May. 10, 2019

Relevance Overview

Getting the Best Results

Relevance touches on every aspect of the Algolia search experience. It governs everything from how you structure your data, to how the engine queries your indices and orders the results, to what your users see as they type. And everything in between.

Our focus here is on configuration, to get the best results in all situations.

Configuration is about telling Algolia how to search your data. You already began this process while structuring your data, where you told Algolia which attributes to search in and which to use to customize your ranking.

Defining searchable attributes and customizing your ranking are two Must Dos before configuring anything else. These actions alone could get you production-ready.

Getting the Best from Algolia

Before going live, though, we suggest you get familiar with Algolia’s key features. Some are immediately useful, like creating synonyms and adding filtering and alternative sortings. Others quickly become important, like merchandising, grouping records, and geolocation. Later, as your solution evolves, you’ll take advantage of analytics, Click and Conversion Tracking, personalization, and A/B testing. Finally, you’ll want to know and master the core features of Algolia’s engine, such as Typo Tolerance, Prefix Search, NLP, Detecting User Intent, and others. Knowing how the engine works will be invaluable to you as you structure your data and fine-tune your results.

In the Managing Results section, therefore, we guide you through the entire configuration process, showing you how Algolia has solved the most common use cases for search. Along the way, we explain the engine’s default settings and when you need to override them (rarely). Finally, we help you identify and solve situations that fall outside the norm.

What Do We Mean by Relevance?

  1. Finding the right records (textual relevance) that match a query.
  2. Ranking records so that the best-matched records appear at the top of the list.

1. Textual relevance

Textual relevance consists of defining attributes and text-based rules that affect the engine’s choice of which objects to return. These include typos, prefixes, plurals, stop words, and other such text-based criteria that Algolia uses to enhance relevancy. There are also some non-text based criteria, such as filtering and geolocation.

2. Ranking

Ranking is the critical part, because what users see first in their list of results matters the most, and this depends entirely on the order of the records. Algolia’s ranking is based off a tie-breaking algorithm, where specific rules, or criteria, are used to sort and bucket results together and break ties between equal matches.

As listed above, Algolia offers a host of features that address both matching and ranking.

Index Setting and Query Parameters

There are two ways and times to configure Algolia search:

  • Index Settings
  • Query Parameters

Index settings take place at “indexing time” - that is, when you are adding, updating, or removing data, or merely changing settings directly on the index. These changes are permanent and global - they affect how the data is stored, and every search is impacted.

Configuring your query is different. When you send a query to Algolia, you can add parameters that alter the index settings. These parameters are neither permanent nor global; they only impact the current search.

While you can do a lot with query parameters, some settings can only be done at indexing time, as they affect how the data is stored. This can be seen in adding new synonyms or changing typo tolerance settings. Same with query parameters - some settings make sense only at query time, like filtering, geolocation, and defining which attributes to retrieve.

We indicate throughout our documentation whether a setting is available at index time, query time, or both.

Did you find this page helpful?