# Store search

> How your store search finds products in every language, and how you steer it: synonyms, rules, ranking, analytics, personalisation and A/B tests.

Store user docs, v1.249.5. HTML: https://docs-next.commernauts.com/store/v1.249.5/search

In the dashboard: A store, Store search (Rules and ranking, Synonyms, Personalisation); Admin, Observability, Search analytics

## Why the search matters

Why: shoppers who search know what they want and buy more often than others, so a search that finds nothing loses a sale. How: your store has its own search, built into the store and kept in its own database. It needs no setup, and every setting below is optional.

## How a search finds products

Why: shoppers type in their own words, in their own language, with typos. How: the search tries these stages in order and answers with the first one that finds products.

| Stage | What it does | Example |
| --- | --- | --- |
| As typed | Every word with its other forms (plural, case endings), compound words split into their parts, the last word also as the start of a word, and your synonyms. Ranked by where the words appear: title, collections, attributes, description. | "Stühle" finds Stuhl; "Bürostuhl" holds Stuhl |
| Other language | Words that find nothing are looked up in the language dictionary of your store's languages. | "chair" finds Stuhl in a German store |
| Typo corrected | Words of 4 letters and more may differ by one letter, from 8 letters by two. The page says "Did you mean". | "relciner" finds Recliner |
| Fewer words | Words that find nothing are left out, then the rarest, until the rest finds products. The page says which words were left out. | "oak chair xyz" finds oak chairs |
| Popular products | When nothing matches, the store's products in stock and bestsellers, so a shopper never sees an empty page. The search counts as "found nothing" in the analytics. |  |

The header's search box suggests while the shopper types, from the second letter: popular searches, words from matching products, collections and up to four products with picture and price. A shopper's recent searches stay on their own device.

Filters (attributes, price, colours, collections, in stock) and their counts are computed over the matched products. A search lists at most 1,000 products, the best first.

## Languages

Why: a store that sells in several countries has product texts and shoppers in several languages. How: the search reads every product in each language it has a translation in, and analyses each text in its own language: all 27 storefront languages, with word forms, compound words in German, Dutch, the Nordic languages and others, and a dictionary that connects them through English. A word is searched in the store's main language, its other languages and English.

Store search, Synonyms has a try-out field: type a product text or a search and see the forms, parts and translations the search makes of it.

## The search index

Why: reading 100,000 products for every search would be slow and expensive, so the search reads a prepared index. How: a saved product, translation, attribute or collection is indexed again by the next search. A new main language, or a new version of the language analysis in a store update, needs every product analysed again: the store rebuilds the whole index by itself, in the background, and searches use the current index until the new one is complete.

1. Open the store, then Store search, then Synonyms. The Search index card shows whether the index is up to date, or how many products the rebuild has analysed.
2. Rebuild index starts a rebuild by hand, for example after a large import. Show progress reads how far it is.
3. A rebuild of 100,000 products in four languages takes a few minutes. Searches keep working the whole time.

> Synonyms, rules, ranking weights and personalisation apply when a search runs. They need no rebuild and work within a minute of saving.

## Synonyms and stop words

Why: the search knows word forms, typos and translations, but it cannot know that your shoppers say "couch" for what you call a sofa, or use a brand name for a product type. How: Store search, Synonyms.

| Kind | What it does | Example |
| --- | --- | --- |
| Mean the same (A = B) | Each word finds the products of the others. | sofa = couch |
| One way (A finds B) | The first word also finds the others, the others do not find the first. | TV bench finds lowboards |
| Search as (A is searched as B) | The first word is searched as the others only. | Kallax is searched as shelf |

A synonym applies to one language or to every language. Search analytics lists the searches that found nothing, each with a button to add a synonym in one step.

## Rules

Why: some searches deserve a hand-picked answer: a campaign product on top, a sold-out range lower, a brand name sent straight to its collection. How: Store search, Rules and ranking, New rule.

| Action | What it does |
| --- | --- |
| Pin | Puts a product at a position you choose. |
| Boost | Moves a product, a collection, an attribute value, products in stock or new products further up: light, medium or strong. |
| Bury | Moves them further down, with the same choices. |
| Hide | Leaves a product out of the results. |
| Redirect | Opens a collection, a product or another address in the store instead of the results. |

- When the search: means the words (with their forms and synonyms), is exactly them, contains them, or any search.
- For whom: customer groups, devices and countries. A rule without conditions is for everyone.
- When: a first and a last day, or always. Active, Draft or Paused.
- Priority: High, Normal or Low. A higher priority applies first.
- Preview shows the results before and after the rule, side by side, before you save it.

## Ranking

Why: which product comes first decides what most shoppers see. How: Store search, Rules and ranking, Ranking, with a slider for each signal and a preview.

| Signal | What it does |
| --- | --- |
| Matches the search | How well the words match: the order the search finds. |
| Sales | Bestsellers of the last 30 days further up. |
| Newness | Products from the last 60 days a little further up. |
| Rating | Well-reviewed products further up. |
| In stock | Sold-out products further down. |
| Clicks | Products shoppers click for this search further up, once at least 5 visits clicked them. |
| Title, Collections, Attributes, Description | How much a match in each part of the product counts. |

Reset puts the defaults back. A customer group can have its own ranking (Personalisation).

## Search analytics

Why: the searches that find nothing, and the searches whose results nobody clicks, show what your catalogue or your words are missing. How: Admin, Observability, Search analytics, for anyone with observability access.

- Six numbers against the period before: searches, visits with a search, found nothing, click-through rate, purchase after search and revenue from search.
- Searches and searches that found nothing per day.
- Top searches with click-through, conversion and the average position clicked. Open one for its funnel, the products clicked and why each was placed, the filters used and the next searches.
- Searches that found nothing, each with Add synonym.
- Where searches start and who searches: page, device, country, customer group, language and hour of the day.
- Every table downloads as CSV. Search terms under Observability lists the raw searches.

> The numbers come from your store's own events, kept in its own database under your consent rules (Markets and consent).

## Personalisation

Why: a business buyer looking for 40 chairs and a family looking for one want different first results. How: Store search, Personalisation.

- Customer groups: each group can get its own ranking weights, with a preview side by side with guests. Rules can also be limited to groups.
- Viewed collections further up: who looked at garden furniture sees garden chairs further up for "chair".
- Preferred colours and materials: from the products the shopper viewed, added to the cart or bought in the last 90 days.
- Bought products further down: a sofa just bought shows further down in later searches.

A page ranked for one shopper is never shared with another visitor or kept at the edge.

## A/B tests

Why: a new ranking is a guess until it is measured on real shoppers. How: Store search, Personalisation, A/B test. Choose new weights for arm B, the share of visitors who get it (50, 20 or 10 percent) and the goal (a purchase after a search, or a click on a result). Arm A keeps the store's ranking.

1. Start the test. Each visitor stays in their arm for the test; visitors in a customer group with its own ranking take no part.
2. Read searches, clicks, adds to cart, purchases and revenue per arm, and how sure the difference is.
3. Stop the test, or make the winner the store's ranking. One test runs at a time.

## Consent

Why: personalising a search uses what a shopper did before, which shoppers have a right to decide about. How: the store's consent rules (Markets and consent) decide per country whether a visitor may have a visitor id. Only a shopper with one, or signed in under the same decision, gets personalised results. Their interests are read from the events and orders the store already keeps, worked out for that search, and nothing new is stored about them. Without consent the shopper gets their customer group's ranking.

## Large catalogues

Why: furniture and home stores carry tens of thousands of products in several languages, and the search has to stay fast and cheap there. How: the search reads a bounded part of the index for every search, however common the words are, and was measured on a test store of 100,000 products in four languages.

| Measure | Result (100,000 products, 4 languages) |
| --- | --- |
| Results page | about 60 ms of work for a search that finds 1,000 products; a few ms for a precise one |
| Search box suggestions | about 20 ms of work for most typed words |
| Full index rebuild | about 30 seconds of work; a few minutes in the store with its database round trips |

## Related

- [Products](https://docs-next.commernauts.com/store/v1.249.5/products.md)
- [Catalogs and collections](https://docs-next.commernauts.com/store/v1.249.5/catalogs.md)
- [Product fields](https://docs-next.commernauts.com/store/v1.249.5/attributes.md)
- [Reports](https://docs-next.commernauts.com/dash/v1.249.5/reports.md)
- [Markets and consent](https://docs-next.commernauts.com/store/v1.249.5/markets.md)
- [Search API](https://docs-next.commernauts.com/store/v1.249.5/developer/search-api.md)
