- Home
- Documentation
- Search
- Search rules: pin, boost, hide and redirect
Search rules: pin, boost, hide and redirect
How to decide what a search shows in your store: pin products first, rank them higher, hide them or send the search to a page.
This feature is rolling out: we're turning it on in stages with our founding partners. What this guide describes may change before general availability.
In short
A search rule changes what shoppers see when they search for something specific: it shows the products you choose first, ranks them higher, hides them or sends the search to a page of your store. It applies to the exact search or to searches that contain those words, and to new searches at once.
When a rule applies
Each rule starts with the search it applies to, in When the search is: written the way shoppers type it, with accents and capitals not mattering, in 100 characters at most. Under Match you choose how it's compared:
- Exactly this. The whole search is exactly that, no more and no less.
- Contains these words. The search includes those whole words, together and in that order. A rule for “camisa roja” applies to “camisa roja manga larga”, but not to “camisa de manga roja”.
What a rule can do
Under Then you choose what it does:
| Rule | What it does |
|---|---|
| Show these products first | The products you choose appear at the very top, in the order you chose them, even if they don't contain the words searched |
| Rank these products higher | If they match the search, they appear before the rest of the results (after the pinned products and the codes), even when the shopper sorts by price or by newest |
| Hide these products | They don't appear for that search, neither in the suggestions nor on the results page |
| Send shoppers to a page | Whoever searches for that goes straight to a page of your store (starting with /, like /collections/sale) or to an https:// address |
To pin, boost or hide, you choose 1 to 50 products with Choose products. You can choose any product, but only active products published to your online store show in search.
The redirect happens on the results page, so it needs the “Search results” block in your theme. In instant search, that search suggests no products.
If several rules apply to the same search, they combine: a redirect wins over everything else, and a hidden product doesn't appear even if another rule pins or boosts it. When several redirect or pin products, the Exactly this rules go first, then the Contains these words ones, and the oldest first among them: the first redirect wins, and pinned products follow that order.
Search rules are separate from a collection's pinned products: those are set up in Sort collections automatically.
Boosts in Shopify's own search too
“Boosts are also written to Shopify's own search (product search boosts), so it agrees where it still runs.” Toldo adds the search of each Rank these products higher rule to those products' search boosts in Shopify: up to 10 searches per product, counting the ones you added. The boosts you added yourself are kept and go first; Toldo only removes the ones it wrote.
For that, Toldo needs permission to edit products. If you haven't given it, when you choose Rank these products higher you'll see “Writing boosts into Shopify's own search needs permission to edit products. Toldo's search applies the rule either way.”, with the Give permission button. Toldo writes the boosts when you save or delete a Rank these products higher rule, and those of the rules you saved before giving permission as soon as you give it.
Steps to create a rule
- Open Search rules. In Toldo, go to Search and open Search rules.
- Type the search. Click Add a rule and type the search in When the search is.
- Choose the match. Under Match, choose Exactly this or Contains these words.
- Choose what it does. Under Then, choose the rule. To pin, boost or hide, click Choose products; to redirect, type the Page address.
- Save. Click Save: “Rule saved.” The rule applies to new searches at once.
Frequently asked questions
Do rules change Shopify's own search?
Only boosts, if you give permission to edit products: Toldo writes them to Shopify's product search boosts. Pinning, hiding and redirecting only apply in Toldo's search.
Can I create a rule from the analytics?
Yes. Under Analytics, Pin products pins the products you choose for that exact search, and Redirect opens a rule with the search already filled in. See Search analytics.
What happens if I pin a product that doesn't match the search?
It shows anyway, at the very top: pinning doesn't depend on the words. It doesn't show if another rule hides it, if the shopper filters the results and the product doesn't pass the filter, or if it isn't active and published to your online store.