FIELD NOTES · ACCEPTANCE EXERCISES

Test site-search synonyms without hiding the wrong products

A broad synonym can rescue an empty search and simultaneously introduce irrelevant products. Before purchasing search optimisation, ask which query should expand, which direction is allowed and what results must stay excluded. This is internal site search, not Google keyword targeting or a new landing-page strategy.

Official feature boundary

Algolia’s synonym documentation describes directional expansion and warns that synonyms do not cascade or guarantee identical result sets. Checked 16 October 2026. The finite fixture below is a proposed acceptance contract; it does not reproduce Algolia ranking, tokenisation or Chinese-language analysis.

Filled catalogue and query matrix

Synthetic catalogue: D1 is a door seal, W1 a window seal and G1 a general gasket. The business has verified that “draught strip” is a useful alternate phrase for D1. No compatibility is inferred between D1, W1 and G1.

On narrow screens, scroll sideways to read the full table.

QueryProposed expansionExpected relevant setGuardrail
door sealNoneD1Do not broaden to all gaskets
draught stripOne-way → door sealD1Reverse expansion not required
window sealNoneW1Keep window intent
sealNo global auto-expansionD1 + W1 only if scoped catalogue supports itReview ambiguity first
gasketNoneG1Do not inherit a second-hop synonym
门密封条Verified D1 language aliasD1 after language testDo not assume automatic translation

Compare the available approaches

A one-way synonym suits an agreed phrase that should broaden towards a canonical product term without forcing the reverse. A product-specific alternate-term field can keep an alias within a category. A global two-way synonym is appropriate only where the terms are genuinely interchangeable for this catalogue. Choose from observed search failures and product knowledge, not a dictionary list copied across the site.

Acceptance sequence

  1. Save a redacted baseline query and the current returned product IDs.
  2. Add only the agreed rule in an isolated index or test configuration.
  3. Replay every matrix row, checking both expected and forbidden results.
  4. Test exact SKU queries, singular/plural forms and real Chinese phrases separately. Preserve ranking positions when relevance order matters.

Read the output

For the downloadable one-step expansion, “seal” expands to “door seal” when that rule is supplied, but does not automatically reach “gasket” through another rule. This checks direction and non-cascading only. A correct expansion still needs a live engine test to establish relevant results and ordering.

Limits

No customer search logs, live catalogue or search account were accessed. The fixture is not an engine integration and proves no click, conversion or SEO improvement. Require the catalogue owner to approve semantic equivalence; an alias must never imply an unsupported technical specification or product compatibility.

Replay the teaching example

These files run locally without network access. They model only the stated cases, not a live vendor integration. Filled inputs and expected results · Inspectable teaching functions

Save both files in one folder. With Node 22.13 or newer, run:

node decision-check.mjs site-search-synonym-acceptance.json