Relevance Overview
On this page
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 general 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, it’s best to get familiar with Algolia’s key features. Some are immediately useful, like creating synonyms and adding filtering and alternative sorts. 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 learn the core features of Algolia’s engine, such as Typo Tolerance, Prefix Search, Natural Language Processing (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?
- Finding the records that match a query.
- Ranking those records so that the best-matched results appear at the top of the list.
1.Finding results
Finding results consists of defining attributes and text-based comparisons 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 results
Ranking is critical. Users should see the results that most closely match their queries first: this is wholly dependent on the order in which records are presented . Algolia’s ranking is based off a tie-breaking algorithm where specific criteria are used to order and bucket results together and break ties between equal matches.
Most of Algolia’s matching and ranking features are listed above.
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 indexing time, query time, or both.