Search by Algolia
Add InstantSearch and Autocomplete to your search experience in just 5 minutes
product

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 ...

Imogen Lovera

Senior Product Manager

Best practices of conversion-focused ecommerce website design
e-commerce

Best practices of conversion-focused ecommerce website design

The inviting ecommerce website template that balances bright colors with plenty of white space. The stylized fonts for the headers ...

Catherine Dee

Search and Discovery writer

Ecommerce product listing pages: what they are and how to optimize them for maximum conversion
e-commerce

Ecommerce product listing pages: what they are and how to optimize them for maximum conversion

Imagine an online shopping experience designed to reflect your unique consumer needs and preferences — a digital world shaped completely around ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

DevBit Recap: Winter 2023 — Community
engineering

DevBit Recap: Winter 2023 — Community

Winter is here for those in the northern hemisphere, with thoughts drifting toward cozy blankets and mulled wine. But before ...

Chuck Meyer

Sr. Developer Relations Engineer

How to create the highest-converting product detail pages (PDPs)
e-commerce

How to create the highest-converting product detail pages (PDPs)

What if there were a way to persuade shoppers who find your ecommerce site, ultimately making it to a product ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

Highlights from GopherCon Australia 2023
engineering

Highlights from GopherCon Australia 2023

This year a bunch of our engineers from our Sydney office attended GopherCon AU at University of Technology, Sydney, in ...

David Howden
James Kozianski

David Howden &

James Kozianski

Enhancing customer engagement: The role of conversational commerce
e-commerce

Enhancing customer engagement: The role of conversational commerce

Second only to personalization, conversational commerce has been a hot topic of conversation (pun intended) amongst retailers for the better ...

Michael Klein

Principal, Klein4Retail

Craft a unique discovery experience with AI-powered recommendations
product

Craft a unique discovery experience with AI-powered recommendations

Algolia’s Recommend complements site search and discovery. As customers browse or search your site, dynamic recommendations encourage customers to ...

Maria Lungu

Frontend Engineer

What are product detail pages and why are they critical for ecommerce success?
e-commerce

What are product detail pages and why are they critical for ecommerce success?

Winter is coming, along with a bunch of houseguests. You want to replace your battered old sofa — after all,  the ...

Catherine Dee

Search and Discovery writer

Why weights are often counterproductive in ranking
engineering

Why weights are often counterproductive in ranking

Search is a very complex problem Search is a complex problem that is hard to customize to a particular use ...

Julien Lemoine

Co-founder & former CTO at Algolia

How to increase your ecommerce conversion rate in 2024
e-commerce

How to increase your ecommerce conversion rate in 2024

2%. That’s the average conversion rate for an online store. Unless you’re performing at Amazon’s promoted products ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

How does a vector database work? A quick tutorial
ai

How does a vector database work? A quick tutorial

What’s a vector database? And how different is it than a regular-old traditional relational database? If you’re ...

Catherine Dee

Search and Discovery writer

Removing outliers for A/B search tests
engineering

Removing outliers for A/B search tests

How do you measure the success of a new feature? How do you test the impact? There are different ways ...

Christopher Hawke

Senior Software Engineer

Easily integrate Algolia into native apps with FlutterFlow
engineering

Easily integrate Algolia into native apps with FlutterFlow

Algolia's advanced search capabilities pair seamlessly with iOS or Android Apps when using FlutterFlow. App development and search design ...

Chuck Meyer

Sr. Developer Relations Engineer

Algolia's search propels 1,000s of retailers to Black Friday success
e-commerce

Algolia's search propels 1,000s of retailers to Black Friday success

In the midst of the Black Friday shopping frenzy, Algolia soared to new heights, setting new records and delivering an ...

Bernadette Nixon

Chief Executive Officer and Board Member at Algolia

Generative AI’s impact on the ecommerce industry
ai

Generative AI’s impact on the ecommerce industry

When was your last online shopping trip, and how did it go? For consumers, it’s becoming arguably tougher to ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

What’s the average ecommerce conversion rate and how does yours compare?
e-commerce

What’s the average ecommerce conversion rate and how does yours compare?

Have you put your blood, sweat, and tears into perfecting your online store, only to see your conversion rates stuck ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

What are AI chatbots, how do they work, and how have they impacted ecommerce?
ai

What are AI chatbots, how do they work, and how have they impacted ecommerce?

“Hello, how can I help you today?”  This has to be the most tired, but nevertheless tried-and-true ...

Catherine Dee

Search and Discovery writer

Looking for something?

facebookfacebooklinkedinlinkedintwittertwittermailmail

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.

Make filters from textual queries

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”.

customize your search experience with query rules

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:

Query rules visual editor

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”.

Setting query rule conditions

 

Then click Filter Results, so that when Algolia sees the user’s query and triggers this rule, it’ll filter how we expect:

Query rules category filters

Temporary pins

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:

Query rules 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!

About the author
Jaden Baptista

Technical Writer

Recommended Articles

Powered byAlgolia Algolia Recommend

Enhance & Promote Results: Introducing Query Rules
product

Nicolas Baissas

4 questions to ask for relevant search results
product

Jaden Baptista

Technical Writer

What is a search query and how is it processed by a search engine?
product

Catherine Dee

Search and Discovery writer