AI-powered search & discovery for Shopify — set up, integrated and tuned for you.Explore features
Back to Pulse
INDEXA PULSE

Search A/B Testing: How to Test Your Store's Search

Learn how to A/B test ecommerce search: what to change, how to set up control and variant, which metrics matter, and when to roll out a winner.

13 min readIndexa editorial

Search A/B Testing: How to Test Your Store’s Search

Geometric control and variant test illustration

Search A/B testing means splitting shoppers into two groups, giving one your current search (the control) and the other a changed version (the variant), then comparing what each group does next. The goal is simple: find out whether a change to search finds more buyers, instead of guessing. Done well, it turns search from a black box into the most measurable part of your store.

This guide is for Shopify merchants and ecommerce teams. It covers what to test, how to set a test up, which numbers to watch, how to read the result, and where AI fits in.

Indexa
Make Store Search Work Harder
Indexa provides Shopify stores with typo-tolerant, semantic search that helps shoppers find relevant products, even when queries are misspelled or phrased naturally.
Explore Indexa search

TL;DR

  • Test one search change at a time (autocomplete, ranking, synonyms, no-results handling, results layout) against a clear hypothesis.
  • Judge by revenue-linked metrics such as search conversion rate and revenue per search session, not by clicks alone.
  • Keep each shopper in the same group for the whole test, and run it across full weekly cycles before calling a winner.
  • Low-traffic stores often get more from fixing data and zero-result queries first, then testing.
  • AI can propose and tune changes, but a human still owns the hypothesis and the rollout decision.

Table of Contents

Google’s developer glossary describes A/B testing as a statistical comparison of two or more techniques, usually an existing one (A) and a new one (B), to see which performs better and whether the gap is statistically significant. Shopify’s own guide uses the same logic for digital assets: two versions of the same asset compared on user behavior. If you want a broader primer on the method across a whole site, this set of conversion rate optimization tips covers the basics.

Most A/B testing content is about landing pages, headlines and buttons. Search is different in three ways:

  1. Search users are high intent. Shoppers who type a query know roughly what they want. A better result list is worth more per visitor than a better banner.
  2. The change is invisible. You are not changing a color, you are changing which products appear and in what order. Judging that by eye is unreliable.
  3. The population is small. Only a slice of sessions use search, so you need to measure within that slice, which affects how long a test takes.

The last point matters most. If 15% of your sessions use search, a test that splits all traffic dilutes the effect you are trying to see. Count only sessions where a search happened.

Baymard’s research on ecommerce search usability groups the work into a few areas: search-form design and function, autocomplete suggestions and keyboard behavior, query handling and no-results guidance, results-page layout, and filtering and sorting. It notes that more than half of its 31 guidelines concern design and interaction changes to the search field, autocomplete and results. That list is a good menu of test candidates.

Baymard reported in 2024 that 58% of ecommerce sites don’t let shoppers use an autocomplete suggestion as a starting point for building a query. That is a concrete, testable idea: let the active suggestion copy into the field so shoppers can refine it. Measure whether more searchers reach a product page.

Other autocomplete tests: showing product thumbnails next to suggestions, capping the number of suggestions, or promoting category suggestions for broad terms. For setup details and platform limits, see our guide to Shopify predictive search.

Query understanding

This is where most lost sales hide. A shopper types “sneekers” or “something warm for hiking” and gets nothing. Tests worth running:

  • Typo tolerance on versus off for misspelled brand and product names.
  • Synonym mapping (“hoodie” and “sweatshirt”, “couch” and “sofa”).
  • Keyword matching versus semantic matching for natural-language queries.

If you want to see where you stand before testing, our query understanding page explains how these layers work together.

No-results handling

A zero-result page is a dead end. You can test a fallback that shows near matches, popular items or a short “try this” list against the plain empty page. Start by finding out which queries fail: our zero-result search analyzer and the guide to fixing no results on Shopify show how.

Ranking and merchandising

Test how results are ordered: relevance only, relevance plus margin or stock, or relevance plus pinned best sellers for head terms. Merchandising rules and a visual grid editor make these changes quick to build, which shortens your testing cycle.

Results-page layout and filters

Test filter placement, default sort order, number of products per row and whether facets are open or collapsed. Shopify’s native search has a ceiling on how many results show, which shapes what you can test; the walkthrough on search UX beyond the 10-result limit covers the workarounds.

How to set up a search A/B test, step by step

Google Maps Platform describes an A/B process in four stages: prep, build, run and analyze. It was written for address validation, but the structure fits search well.

Four stages of a search A/B test

1. Prep: write the hypothesis

A useful hypothesis names the change, the audience and the expected effect. Compare:

  • Weak: “Better search will increase sales.”
  • Strong: “Adding synonym mapping for our 40 most common failed queries will cut zero-result searches by a third and lift search-to-purchase conversion among mobile searchers.”

Pull the failed queries from your search analytics first. A hypothesis grounded in real queries is far more likely to produce a result you can act on.

2. Build: control and variant

Keep the control exactly as it is. Change one thing in the variant. If you change autocomplete, ranking and layout at once, you cannot tell which one moved the numbers. When several changes are bundled on purpose, treat the bundle as one test and say so in your notes.

Decide before launch:

  • Which sessions qualify (only those that used search).
  • The split (50/50 is simplest).
  • The primary metric and one or two guardrail metrics.
  • The minimum run time.

3. Run: protect the split

Google’s guidance is to keep users from switching between control and experiment groups, especially within one session, and to avoid switches across sessions too. For search, assign by a persistent visitor ID, not by page load. A shopper who sees different results for the same query on two visits loses trust, and your data gets muddy.

Do not peek and stop early the moment one version leads. Early leads are often noise.

4. Analyze: compare with the hypothesis

When the test ends, compare results with what you predicted and write down what you learned, including when the answer is “no difference.” Then decide the next test. The same four stages apply again.

Which metrics to measure

Choose one primary metric and a few guardrails before you start.

Metric What it tells you Use it as
Search conversion rate (searchers who buy) Whether search leads to orders Primary
Revenue per search session Whether results bring higher-value baskets Primary
Zero-result rate How often search fails outright Diagnostic
Search exit rate Shoppers who leave straight after results Diagnostic
Click-through to product page Whether the top results look relevant Supporting
Add-to-cart rate from search Intent after the click Supporting
Returns or refunds on search-led orders Whether you are selling the right thing Guardrail

A caution from Google’s Maps team applies here: a change can add friction and lower conversion in the short run while improving the quality of the outcome, so measure the eventual outcome, not only the first click. In search, a ranking tweak that pushes discounted items might lift clicks and orders but raise returns. Watch the guardrail.

If you want a relevance-level measure before the sales-level one, our piece on testing search relevance with Precision@10 shows how to score the top ten results for your most important queries and tie that score back to revenue.

How much traffic and time you need

There is no single number. The sample you need depends on your baseline conversion rate, the smallest lift you care about detecting, and the confidence level you set. A small expected lift needs many more sessions than a big one. Use a sample-size calculator from any reputable testing platform before you launch, and enter search sessions, not total visits.

Some practical rules of thumb that experienced testers use:

  • Run full weeks. Shopper behavior differs between weekdays and weekends, so end tests on whole-week boundaries, and run at least two weeks when traffic allows.
  • Avoid unusual periods. A sale, a holiday peak or a big ad push can distort one arm or both.
  • Expect small lifts. Most single search changes move conversion by small amounts. Plan for that when sizing the test.

If the calculator says you need months of traffic, the test is not worth running as a pure A/B. That is common for small stores, and it is not a failure. See the next section.

When your store is too small for a clean A/B test

Many Shopify stores, especially small brands, do not have enough search sessions to detect modest differences in a few weeks. You have better options than waiting:

  1. Fix the obvious first. If 12% of your searches return nothing, you do not need a test to know that fixing them helps. Map synonyms, correct data gaps and handle misspellings. Our guide on fixing search data first walks through the order.
  2. Test big changes, not small ones. A large effect is detectable with fewer sessions. Switching from basic keyword matching to typo-tolerant, semantic search is a big change. Moving a filter by 20 pixels is not.
  3. Use a time-boxed pilot with a before-and-after view. It is less rigorous than a split, and seasonality can mislead you, but it is honest and workable if you compare against the same weekdays and watch the guardrails.
  4. Mine long-tail queries. Rare queries add up. See how to recover sales from long-tail queries.

A free, fast way to see where you are today is our Shopify search test, and the search audit checklist lists what to check before you design any experiment.

Reading the results and deciding to roll out

Google’s machine-learning guidance favors incremental, evidence-based experimentation: set a scoped goal, design experiments, evaluate results, and adopt a change only when the evidence supports it. That discipline carries over directly.

A simple decision rule:

  • Clear win on the primary metric, guardrails stable: roll out to everyone, then monitor for two to four weeks.
  • No significant difference: keep the simpler or cheaper version, and log the result. A null result still narrows the search for what matters.
  • Win on clicks, loss on revenue or returns: do not ship. You optimized the wrong thing.
  • Win only in one segment (say, mobile): consider rolling out to that segment and testing the rest separately.

Two common mistakes: segmenting the data after the fact until something looks significant, and running many tests at once on the same search traffic so their effects overlap. Keep a log with the hypothesis, dates, sample size, result and decision.

Perspective: tune from your own store’s data

We run search for Shopify stores as a managed service, and the pattern we see is that the biggest gains rarely come from a clever interface tweak. They come from understanding what shoppers actually type and making sure the catalog answers it. Typos, natural-language phrasing, synonyms and thin product data cause far more lost searches than button placement does.

Perspective: tune from your own store's data — overview diagram

That is why we tune relevance continuously from real store data, and why we suggest a measured pilot before any long commitment. A/B testing is the right instrument once the basics are sound: it settles arguments, protects revenue from changes that look good and perform badly, and builds a record of what your shoppers respond to. Before the basics are sound, it can burn weeks proving the obvious.

Our advice is to test in this order: fix zero-result queries, handle typos and synonyms, then move on to ranking and layout experiments where the differences are subtle and worth measuring.

— Barikreativa

Can AI run your search A/B tests?

Partly. AI can help in several places:

  • Finding candidates. Models can cluster failed queries and flag patterns, such as a family of misspellings or a missing synonym, that a person would take hours to find.
  • Semantic matching. The variant itself may be AI-driven, for example search that understands intent rather than exact words.
  • Adaptive allocation. Some tools shift traffic toward the better-performing arm as data arrives. This can cut the cost of showing a weaker version, but it makes the statistics harder to interpret, so use it knowingly.

What AI should not do is decide on its own what counts as success or approve its own rollout. A person still writes the hypothesis, picks the metrics and guardrails, and signs off. Treat AI output as a source of well-formed hypotheses, not as proof.

Put it into practice with Indexa

If you would rather not build and maintain this yourself, Indexa is a fully managed, AI-driven search and discovery service for Shopify. It provides typo-tolerant and semantic search, synonym mapping, multilingual support, a visual merchandising grid editor for search and category pages, product recommendations and integrated analytics. It needs no setup or coding on your side, and we tune relevance continuously from your store’s own data.

You can start with a free audit to see where your search loses shoppers, then try a 30-day pilot. Details on the pilot, one-time setup fee and flat monthly retainer are on the pricing page.

Indexa

If you want to compare with Shopify’s built-in tooling first, see how the managed upgrade to Shopify Search & Discovery differs, or read about the managed search service as a whole.

A practical first-month plan

  1. Week 1: Export your search queries. List the top 50 by volume and the top 50 zero-result queries.
  2. Week 2: Fix what needs no test: obvious synonyms, misspellings, missing product attributes.
  3. Weeks 3 to 4: Pick one hypothesis with the largest expected effect. Define the primary metric, guardrails and run length. Launch it.
  4. After: Analyze, log, decide, and pick the next test.

For a longer list of what usually moves the needle, see ecommerce site search best practices.

FAQ

What is A/B testing and how is it used in digital marketing?

It is a controlled comparison of two versions of the same asset, such as an ad, page or search experience, shown to similar groups of people at the same time. You measure which version produces more of a chosen outcome, like purchases. Marketers use it to replace opinion with evidence.

Can AI be used to perform A/B testing?

Yes, for parts of it: spotting patterns in failed queries, generating variants and shifting traffic toward better performers. Human judgment is still needed for the hypothesis, the metrics and the final rollout decision.

How do I know if a search A/B test result is reliable?

Check that you hit the planned sample size, ran whole weeks, kept each shopper in one group and saw the difference on your primary metric, not only on a secondary one. If you checked many metrics and only one moved, treat the result as a lead for a follow-up test.

Not always. If your search returns nothing for common queries or ignores typos, fix those first, since the benefit is obvious. Use A/B tests for choices where reasonable people disagree, such as ranking rules or layout.

Sources

INDEXA PULSE

Make discovery work harder.

See what your Shopify search could do better with a free, hands-on audit.

Get your free search audit