Skip to main content

Tune the search

Most buyers find products by searching. Open a storefront and choose Search. You need commerce.search_manage.

The search reads an index of your catalogue. It follows each product change on its own. Rebuild search rebuilds the whole index in the background. Use it after a bulk change: publishing many products at once, an import, or a new storefront filter.

While it runs, it shows how many products it has done, and buyers keep searching the old index. When it is done, it says how many products are indexed. Only one rebuild runs at a time.

What each buyer is shown​

Search, the category pages and the search box's suggestions show a buyer only what they could order. Two things decide it, and neither needs a setting of its own:

  • State product directories. A product a directory refuses in a state (it requires a listing there and the product has none) is not shown to a buyer whose goods go to that state. The state is their account's default ship-to, or the state the storefront asks about. A visitor's state is not known, so they see the product, and the cart decides once they sign in. Setting Refuse regulated lines that may not be sold into the delivery state (compliance.ship_to_restrictions) to off shows these products everywhere, as it lets the cart take them. A licence the buyer needs for their state is not checked here: the product shows, and the cart asks for the licence.
  • Customer-specific products. A product marked Customer Specific is shown only to buyers whose account is on its Customers list. Anybody else, a visitor included, does not find it in search, on a category page or by its SKU, and its product page answers not found.

Recording a listing, changing a directory, moving a category or changing a product's customers reaches search within moments. A directory that starts, or a listing that ends, on a date is applied a day ahead by the nightly rebuild.

Type what a buyer would, and choose Try. You see the first page they get, which results are pinned, and which extra words your synonyms added. If the search redirects, you see where to. Try a search after every change below.

Synonyms​

Words your buyers use for the same thing.

  • Two-way: a search for any of the words finds all of them, such as vape, ecig, e-cig.
  • One-way: a search for the first word also finds the others, but not the reverse. For example, disposable also finds puff bar, but a search for puff bar stays as it is.

Boosts​

Rank what matches higher or lower in every search: a product, a brand, a category (by its code) or a product field's value. A weight above 1 raises it, and below 1 lowers it, from 0.1 to 10. Start small: 1.5 is a strong lift.

Pinned results​

For one search, put a chosen product at a chosen place on the first page, whatever the ranking says. Pin several products to the same search to set the first few in order. To move a pin, edit it. A pinned product that is no longer sold on the storefront is skipped.

Redirects​

For one search, send the buyer straight to a page instead of results: a page on the storefront such as /returns, an https address, or a category's page. Use a redirect for searches like returns, catalogue or a brand name that has its own page.

Every change applies to the next search, with no rebuild, and is recorded in the audit log.