Haystack EU 2023: Learnings and reflections from our team
If you have built search experiences, you know creating a great search experience is a never ending process: the data ...
Senior ML Engineer
If you have built search experiences, you know creating a great search experience is a never ending process: the data ...
Senior ML Engineer
Just as with a school kid who’s left unsupervised when their teacher steps outside to deal with a distraction ...
Search and Discovery writer
Back in May 2014, we added support for synonyms inside Algolia. We took our time to really nail the details ...
Technical Writer
You’re running an ecommerce site for an electronics retailer, and you’re seeing in your analytics that users keep ...
Technical Writer
What do OpenAI and DeepMind have in common? Give up? These innovative organizations both utilize technology known as transformer models ...
Sr. SEO Web Digital Marketing Manager
As a successful in-store boutique manager in 1994, you might have had your merchandisers adorn your street-facing storefront ...
Search and Discovery writer
At Algolia, our business is more than search and discovery, it’s the continuous improvement of site search. If you ...
JavaScript Library Developer
Analytics brings math and data into the otherwise very subjective world of ecommerce. It helps companies quantify how well their ...
Technical Writer
Amid all the momentous developments in the generative AI data space, are you a data scientist struggling to make sense ...
Sr. SEO Web Digital Marketing Manager
Fashion ideas for guest aunt informal summer wedding Funny movie to get my bored high-schoolers off their addictive gaming ...
Sr. SEO Web Digital Marketing Manager
Imagine you're visiting an online art gallery and a specific painting catches your eye. You'd like to find ...
Senior Software Engineer
At Algolia, our commitment to making a positive impact extends far beyond the digital landscape. We believe in the power ...
Senior Manager, People Success
In today’s post-pandemic-yet-still-super-competitive retail landscape, gaining, keeping, and converting ecommerce customers is no easy ...
Sr. SEO Web Digital Marketing Manager
There are few atmospheres as unique as that of a conference exhibit hall: the air always filled with an indescribable ...
Marketing Content Manager
To consider the question of what vectors are, it helps to be a mathematician, or at least someone who’s ...
Search and Discovery writer
My first foray into programming was writing Python on a Raspberry Pi to flicker some LED lights — it wasn’t ...
Technical Writer
How well do you know the world of modern ecommerce? With retail ecommerce sales having exceeded $5.7 trillion worldwide ...
Sr. SEO Web Digital Marketing Manager
In a world of artificial intelligence (AI), data serves as the foundation for machine learning (ML) models to identify trends ...
Director of AI Engineering
Back in May 2014, we added support for synonyms inside Algolia. We took our time to really nail the details, and in the near-decade since, this feature has been useful to just about all of our customers. Given how popular it is, yet how confusing it might be to new users, we figured we’d recap what they are and why our implementation of them works slightly differently than most.
Synonyms tell the search engine which words and expressions to consider equal. For example, a clothing company would likely want to specify that pants and trousers are the same thing, because we’d want a user searching for trousers to get results that don’t contain that word, but that are instead marked as pants.
To change the synonyms in the Algolia dashboard, here’s what you need to do:
Algolia makes this process straightforward and mostly self-explanatory. The only part that might be a little confusing is that last popup – you get to choose between four different types of synonyms:
This is the type of synonyms we described earlier, where two or more terms are marked as identical in the context of that specific application. For example, a clothing company might want to specify that pants and trousers should be counted as the same thing, so results matching one should also match the other term.
This is used when one term should be counted as part of another. For example, an electronics retailer might want to consider iPads as a subset of tablets in general, so that someone searching for tablets would get results for iPads (which likely don’t include the word tablet in their product title), but users searching for iPads won’t get results for Android tablets.
This is how we let one record match many similar but more specific queries. For example, a record for iPhone cases should match more specific queries for each model’s cases. Queries like “iphone 13 case” and “iphone 14 case” are just about as close to records for the phones themselves as a record for a generic iPhone case, so you’d get the most relevant results by putting a placeholder for the model number inside the case record’s title, like this: “iPhone <model> Case”. And then you can create a placeholder synonym for “<model>” with all of the relevant models that the record should match.
This feature is used to consider a one-way synonym a typo for ranking purposes. For example, our user searching for generic tablets might want to also get iPads in the results like in our one-way example, but since someone expecting to get results for iPads likely would have used a more specific query, we’ll consider “iPad” a typo of “tablet” so that a query for tablets will return generic tablets first iPads further down the list.
In most search engines, synonyms are not compatible with typeahead search. For example, the “pants” and “trousers” synonyms wouldn’t activate as the user is typing the query. The first query to go out would be “t”, then “tr”, then “tro”, then “trou”, and so on for each letter – but none of those queries will return any results for “pants”.
Only when the user completes the word “trousers” will all of the “pants” results suddenly pop up, which might be a little jarring for the user. That last letter could completely change the result set, but we can improve that user experience. With Algolia, the synonyms match even as prefixes, so the result set only refines as the query gets longer.
That goes for highlighting too. The part of the result that matches the query in a typical search is highlighted somehow to show why the result is relevant. But that can be hard to understand when matching a synonym. If the reason for relevance isn’t made obvious enough, the user could easily think the search engine just glitched and returned weird, irrelevant results.
However, Algolia returns exactly what the matching word is, so if you make that information clear to the user, you turn their confusion into relief that the engine understood their error.
And that’s synonyms!
It’s one of the most powerful and versatile features that Algolia offers, and if you’d like to learn more about it, you can check out the docs here. Stay tuned for more upcoming Feature Spotlight posts to learn more about what makes Algolia special!
Technical Writer
Powered by Algolia Recommend