Pin or hide results
A custom result sets the results of a query by hand. Pin a hero product on top of dress, hide the wrong category from boots, show only gift cards for gift card, or send sale to your sale page. Nothing automatic outranks it.
Create a rule
Section titled “Create a rule”-
Open Collections → your collection → Custom results and click Add rule.
-
Under When users search for…, type a term, pick Contains or Exact, and click Add. Add more terms if several queries should fire the rule.
-
Under Pin or hide documents, open Pin or Hide and click Add documents. Search by title, ID or category, tick the documents, and click Pin n documents or Hide n documents.
-
Drag the pinned documents into order. The first one tops the results.
-
Under How should results appear?, pick Pinned first or Pinned only. This step shows once something is pinned.
-
Under Redirect to a page (optional), paste a page’s full address to send the query there.
-
Under When is the rule live?, keep Always on, or pick the first and last day.
-
Click Create rule.

Pick documents by a rule
Section titled “Pick documents by a rule”Instead of picking documents one by one, set conditions under Also pin every product where or Also hide every product where. The set stays current: a product added to the category tomorrow joins without an edit.
- Pin
category is Cementfor cement. - Show only
sale price ≥ 1for offers, with Pinned only. - Hide
brand is Acmefrom resin.

| Case | What happens |
|---|---|
| Fields and values | Pick a field to see its values with how many documents carry each. Tick several to match any of them, or type one the list lacks. |
| Numbers and yes/no | Numbers take =, ≠, >, ≥, <, ≤. Yes/no fields take Yes or No. |
| Several conditions | All of them must hold. The count under them shows how many products match now. |
| The query’s words | Not needed: a picked document shows even without them. A rule is your choice of results, not a filter on the search’s. |
| Text fields | Titles and descriptions can’t be used: they are searched, not compared. |
How results are ordered
Section titled “How results are ordered”| Case | What happens |
|---|---|
| Pinned one by one | Come first, in your order. |
| Pinned by a rule | Come next, most popular first. |
| Pinned first | The default. Search results follow on every page, without repeating a pinned document. |
| Pinned only | Only pinned documents show. |
| Hidden | Gone from the results of these queries. |
| Contains | Fires when the query contains the term anywhere, even inside a word: ring also fires for earrings. |
| Exact | Fires when the whole query is the term, in any letter case. |
| Dates | The rule is live from the start of the first day to the end of the last, in your local time. |
| Pausing | The Active switch in the list pauses a rule without deleting it. |
| Limits | Up to 100 terms per rule and 500 documents per list. |
Send a query to a page
Section titled “Send a query to a page”| Case | What happens |
|---|---|
| Pressing Enter | The search widget opens the page. While the visitor types, results show as usual. |
| The address | A full address that starts with https:// or http://. |
| Redirect only | A rule can redirect without pinning or hiding anything. The list marks it with the page’s domain. |
| Several rules | The most specific rule that has a redirect sends the query, in the order below. |
| Your own code | Search responses carry the address in redirect. Your code decides when to go there. |
When rules overlap
Section titled “When rules overlap”A query can fire several rules, say a broad Contains rule for a category and a focused one for one term. Only the most specific rule pins:
- An Exact match beats a Contains match.
- A longer matched term beats a shorter one.
- Then the rule with fewer terms wins.
Documents that any matching rule hides stay hidden. If a broad rule takes the top spot from a focused one, narrow the broad rule or give the focused one an Exact term.
Import and export
Section titled “Import and export”Export downloads the collection’s rules as a JSON file. Import adds the rules from such a file as new rules, up to 500 per file. Prepare a campaign’s rules offline, copy them to another collection, or keep them in a repository.
For developers: a custom result lives on /v1/collections/{id}/curations with queries, pin,
hide, pinnedOnly and redirectUrl. pin and hide are { ids, filter }: ids are document
ids as search returns them, pinned in order. filter is the search filter
without contains. enabled, startsAt and endsAt pause a rule or limit it to dates.
Check it worked
Section titled “Check it worked”Type the trigger on Test your search, then a near miss. Pins should sit in your order, and a Contains term shouldn’t fire wider than you meant.
Next: start with your most frequent searches in Search performance, or boost results by their attributes.