Add InstantSearch and Autocomplete to your search experience in just 5 minutes
A good starting point for building a comprehensive search experience is a straightforward app template. When crafting your application’s ...
Senior Product Manager
A good starting point for building a comprehensive search experience is a straightforward app template. When crafting your application’s ...
Senior Product Manager
The inviting ecommerce website template that balances bright colors with plenty of white space. The stylized fonts for the headers ...
Search and Discovery writer
Imagine an online shopping experience designed to reflect your unique consumer needs and preferences — a digital world shaped completely around ...
Senior Digital Marketing Manager, SEO
Winter is here for those in the northern hemisphere, with thoughts drifting toward cozy blankets and mulled wine. But before ...
Sr. Developer Relations Engineer
What if there were a way to persuade shoppers who find your ecommerce site, ultimately making it to a product ...
Senior Digital Marketing Manager, SEO
This year a bunch of our engineers from our Sydney office attended GopherCon AU at University of Technology, Sydney, in ...
David Howden &
James Kozianski
Second only to personalization, conversational commerce has been a hot topic of conversation (pun intended) amongst retailers for the better ...
Principal, Klein4Retail
Algolia’s Recommend complements site search and discovery. As customers browse or search your site, dynamic recommendations encourage customers to ...
Frontend Engineer
Winter is coming, along with a bunch of houseguests. You want to replace your battered old sofa — after all, the ...
Search and Discovery writer
Search is a very complex problem Search is a complex problem that is hard to customize to a particular use ...
Co-founder & former CTO at Algolia
2%. That’s the average conversion rate for an online store. Unless you’re performing at Amazon’s promoted products ...
Senior Digital Marketing Manager, SEO
What’s a vector database? And how different is it than a regular-old traditional relational database? If you’re ...
Search and Discovery writer
How do you measure the success of a new feature? How do you test the impact? There are different ways ...
Senior Software Engineer
Algolia's advanced search capabilities pair seamlessly with iOS or Android Apps when using FlutterFlow. App development and search design ...
Sr. Developer Relations Engineer
In the midst of the Black Friday shopping frenzy, Algolia soared to new heights, setting new records and delivering an ...
Chief Executive Officer and Board Member at Algolia
When was your last online shopping trip, and how did it go? For consumers, it’s becoming arguably tougher to ...
Senior Digital Marketing Manager, SEO
Have you put your blood, sweat, and tears into perfecting your online store, only to see your conversion rates stuck ...
Senior Digital Marketing Manager, SEO
“Hello, how can I help you today?” This has to be the most tired, but nevertheless tried-and-true ...
Search and Discovery writer
You’re running an ecommerce site for an electronics retailer, and you’re seeing in your analytics that users keep searching for “cheap phones”. Right now, that’s leading to a ton of empty result sets, bounced users, and lost revenue, so your supervisor has tasked you with doing something about it.
One colleague suggested adding the word “cheap” to phone results that are under $400, but you know that’s not a good idea. Not only does having the word “cheap” in your product titles or description just sound like bad marketing, it’s completely unsustainable because product prices change all the time.
Another colleague suggested hardcoding a rule in your codebase to convert the word “cheap” in a query into a filter for products under $400, and while that’s definitely closer to the right solution, you can tell that’s not sustainable either. It requires putting more on the developers’ plate, creating your own system to handle the hardcoded rules, and keeping somebody with technical skills around to manually add more rules in the future.
Wouldn’t it be nice if your search engine handled the technicality of this for you and gave you a clean UI to manage these rules with?
Enter Algolia’s Query Rules.
The use-case described above is easy to fix with Algolia. Inside your search index, click on the Rules tab on the left and click “Create your first Rule”.
Select the Visual Editor (this is the one that you don’t need technical skills to manage) and you’ll get a window like this:
Start by choosing one of the three options in the top left. For our cheap phone example, try setting a query condition that triggers when the query contains the words “cheap phone”.
Then click Filter Results, so that when Algolia sees the user’s query and triggers this rule, it’ll filter how we expect:
Another thing you can do with Query Rules is pin results based on some query trigger. For example, our fictional smartphone retailer probably wants the newest phones to show up in search results they match. But when you think about it, they’ll have very few views and sales, so there’s really no logical reason that the engine would prioritize these entries.
We can handle this with Query Rules. Let’s promote the (still-future-as-of-writing) iPhone 15 from September to December 2023 by setting a date range trigger:
Then click Pin items, select the result representing the iPhone 15, and keep the checkbox checked.
In our case, we only want the iPhone 15 pinned to the top of the search results if that’s actually what the user was searching for. The user experience could get really frustrating otherwise in our use-case – imagine searching for something else an electronics store would sell like a speaker system, but every search returns the latest iPhone in first place – but there are legitimate use-cases where it might be a good idea to untick this box.
You can use the same logic system to boost or bury certain product categories – noticing VR and AR products are skyrocketing in popularity and performing really well whenever users see them? Boost them in the search rankings to take advantage of the trend.
Perhaps you’re not going to be stocking some products for a while – maybe you could use a query rule to hide some items or boost their replacements. The possibilities are endless!
If you’re curious about how to use this to implement your great ideas, check out the more thorough docs here. Happy building!
Technical Writer
Powered by Algolia Recommend