Guides / Managing results / Rules

Merchandising is the promotion of specific products or categories of products. It lets you:

  • Offer recommendations to your users
  • Highlight your inventory’s best products
  • Follow trends
  • Improve conversion rates.

Algolia offers multiple merchandising capabilities, all powered by Rules. The dashboard provides two separate interfaces for creating rules: the Manual Editor and the Visual Editor.

  • The Visual Editor lets you create rules and set search results for specific queries without code, giving you direct control over search results and promotions.
  • The Manual Editor lets you create advanced rules.

Using the Visual Editor to create rules

Rules and the Visual Editor are available on Premium plans. See the pricing page for details.

You can use Rules to detect and respond to your users’ intent or merchandise and promote content. This guide focuses on the latter.

If a rule’s condition is met, you can modify your user’s search results to, for example:

Promoting hits

Promoting a hit means you want it to appear first in results for a specific query. For example:

  • A bookstore may want to recommend a Harry Potter box set whenever the term “Harry Potter” appears in the search.
  • You may want to manage new releases for the latest iPhone. With custom ranking, you’ve placed best-selling items at the top of your search results. Unfortunately, this doesn’t work well with new releases, which have no sales yet (meaning they’re probably listed last). With Rules, you can force new releases to the top of the results list without changing your custom ranking.

You can promote up to 300 hits in a single rule.

Hiding hits

You can hide hits if required. Your index may contain records relevant only to a specific search. For example, imagine you have a website where people can search for dishes from restaurants with home-delivery service. If someone types “gluten free”, you don’t want to show items with gluten (even though gluten is in the query). Hiding hits allows you to remove all gluten items from the results.

Redirect to URL

You can add a redirect to a specific URL. For example, consider that you find in your search analytics that a lot of your users are searching for “help” but don’t get any results. You can add a redirect for this query to your website’s FAQ or support page. This improves the user experience and reduces the no-results rate. Other examples include searching for a category. For example the query “TV” redirects users to the corresponding category page. Or, searching for a specific product or brand redirects users to a seasonal promotional page for it.

Displaying banners

You can display a banner to promote an item, a group of products, a business-wide sale, and so on. Using the same logic as hits promotion (looking for specific keywords in a query), you can create a rule with the necessary data to display a banner: the text, HTML, CSS, and associated images.

Dynamically promoting filters

You can promote filters with Rules. This is covered in more detail as part of intent detection, but it’s worth noting here as part of an overall merchandising strategy. If you detect that a user wants to see an important product category, you can promote these products using dynamically generated filters. You can also dynamically generate optional filters.

Using optional filters

Optional filters let you favor some filters over others. They behave like regular filters, except that with optional filtering, results that don’t match a filter aren’t excluded altogether: they’re only ranked lower in the results. For example, if you know a user is interested in the brand Samsung, you can promote that brand with Optional filters: when the user types in “phone”, all Samsung phones will be returned first, followed by all other phones.

Combining rules

You can use the merchandising techniques individually or in combination: one condition can have more than one consequence. For example, if a user types “Harry Potter”, you can simultaneously:

  • Promote movies over books
  • Set the most recent Harry Potter box set as the first result
  • Add filters for J. K. Rowling, children’s novels, or the fantasy genre.
Did you find this page helpful?