Configure Commerce Search v3 controls

  • Updated

Commerce Search v3 in Optimizely Configured Commerce lets you configure search controls that influence your search results. After you implement Commerce Search v3, you should test the text searches and browse searches to see how the default search settings align with your needs. Start with the default search settings to establish a baseline. If adjustments are needed, you can customize the controls to tailor the search experience based on specific business goals or user behavior. Follow the steps to create or modify search configurations and controls.

You can create separate search configurations for each website and each language it supports. This helps you tailor search results to match local content, language, and user expectations. It also ensures that your site provides accurate and relevant results for every audience.

image-2.png

Serving Configs

Serving Configs in Commerce Search v3 lets you create serving configurations. These configurations associate a machine learning model with one or more serving controls to drive the generation and customization of search results.

By default, Commerce uses the default_search serving configuration provided out of the box. You should associate any new serving controls with this default configuration to streamline configuration and maintain consistency. 

Alternatively, you can create a serving config. When configuring a new serving config, record its Config ID and the website, as you need this to update the Serving Config ID field in the settings to activate it.

If your website supports multiple languages, create the Serving Config with same Config Id across all associated languages to ensure search functionality works as expected.

Create a serving config

  1. Go to Marketing > Commerce Search v3 > Serving Configs > Create Serving Config.

  2. Add a Config Name.
  3. Add a Config Id.
  4. Add the appropriate Serving Controls.
  5. Click Submit.
  6. Update Serving Config ID Search Settings. Go to Administration > Settings > Search > Select Website > Serving Config ID.

    image-3.png
  7. Rebuild your search index and test the search.

Serving Controls

Serving Controls in Commerce Search v3 lets you create the following controls.

Boost/bury

Adjusts ranking by promoting or demoting specific products or categories.

  1. Go to Marketing > Commerce Search v3.
  2. Click Serving Controls > Create Control. Add a Control Name and select Boost/Bury Controls as the Control Type. Choose a Trigger for the control to affect either searches or browsing categories.

    When choosing Browse Categories as the Trigger, the Page Categories must use the > sign to separate different hierarchies. For example: Office Products > Computer Accessories > Computer Hardware.

  3. Add any Partial or Exact match query terms and any Applicable Time Ranges within which the control should be effective.

    Query terms and time ranges.png
  4. Add a Rule and assign a Boost/Bury value

    The following are examples of simple and nested rule formats you can use in a Rule

    • attributes.size: ANY("Medium", "Large") AND attributes.packaging_Type: ANY("Box", "Pouch")
    • (attributes.shape: ANY("Round") AND attributes.pattern: ANY("Solid")) OR attributes.length: ANY("Long")
    • attributes.material: ANY("Cotton", "Polyster") AND brands: ANY("Gap")
    • id: ANY("0004145f-12ff-49b5-8397-ae4600f468e2") // Lower case product guid.
  5. Click Submit.
  6. Associate the new Serving Control with the Serving Config Id and test the search.

Filters

Excludes results that do not meet specific criteria.

  1. Go to Marketing > Commerce Search v3.
  2. Click Serving Controls > Create Control. Add a Control Name and select Filter Controls as the Control Type. Choose a Trigger for The control to affect either searches or browsing categories.

  3. Add any Partial or Exact match query terms and any Applicable Time Ranges within which the control should be effective.

  4. Add a Rule

  5. Click Submit.
  6. Associate the new Serving Control with the Serving Config Id and test the search.

Redirects

Sends users to a specific page based on their query.

  1. Go to Marketing > Commerce Search v3.
  2. Click Serving Controls > Create Control. Add a Control Name and select Redirect Controls as the Control Type. Choose a Trigger for the control to affect either searches or browsing categories.

  3. Add any Partial or Exact match query terms and any Applicable Time Ranges within which the control should be effective.

  4. Enter a URL for the Redirect Control.

  5. Click Submit.
  6. Associate the new Serving Control with the Serving Config Id and test the search.

Two-way synonyms

Adds related terms to broaden search results for a query.

  1. Go to Marketing > Commerce Search v3.
  2. Click Serving Controls > Create Control. Add a Control Name and select Two-way Synonym Control as the Control Type. Choose Search as the Trigger.

  3. Add the Synonyms and any preferred Applicable Time Ranges.

  4. Click Submit.
  5. Associate the new Serving Control with the Serving Config Id and test the search.

One-way synonyms

Adds alternate terms for specific queries without applying the reverse mapping.

  1. Go to Marketing > Commerce Search v3.
  2. Click Serving Controls > Create Control. Add a Control Name and select One-way Synonym Control as the Control Type. Choose Search as the Trigger.

  3. Add the Query Terms and Synonyms and any preferred Applicable Time Ranges.

  4. Click Submit.
  5. Associate the new Serving Control with preferred Serving Config Id and test the search with this configuration.

Do not associate

Blocks certain terms from being linked in search when specific keywords are present.

  1. Go to Marketing > Commerce Search v3.
  2. Click Serving Controls > Create Control. Add a Control Name and select Do not Associate Control as the Control Type. Choose Search as the Trigger.

  3. Add the Query Terms and Dissociated Terms and any preferred Applicable Time Ranges.

  4. Click Submit.
  5. Associate the new Serving Control with the Serving Config Id and test the search.

Ignore

Excludes designated terms from being factored into search queries.

  1. Go to Marketing > Commerce Search v3.
  2. Click Serving Controls > Create Control. Add a Control Name and select Ignore Control as the Control Type. Choose Search as the Trigger.

  3. Add Ignore Terms and any preferred Applicable Time Ranges.

  4. Click Submit.
  5. Associate the new Serving Control with the Serving Config Id and test the search.

Replacements

Substitutes specific terms in the query with predefined alternatives.

  1. Go to Marketing > Commerce Search v3.
  2. Click Serving Controls > Create Control. Add a Control Name and select Replacement Control as the Control Type. Choose Search as the Trigger.

  3. Add the Query Terms and Replacement Term and any preferred Applicable Time Ranges.

  4. Click Submit.
  5. Associate the new Serving Control with the Serving Config Id and test the search.

Attribute Controls

Attribute Controls in Commerce Search v3 impact the search and recommendations behavior across your site. You can configure behavior for product attributes. Go to Marketing > Commerce Search v3 > Attribute Controls > Create Attribute.

You can edit the following information: (Note: Some of the below fields in certain System Attributes cannot be changed and will remain set to their default values.)

  • Attribute Name
  • Type
  • Indexable
  • Dynamic Faceting
  • Searchable
  • Retrievable
  • Exact Match 

Click Save when finished. Changes to Indexable, Searchable, and Retrievable apply immediately on your next catalog ingestion or within 12 hours or more. Changes to Dynamic Faceting and Exact Match apply within two days. Changes to Filterable only apply to filter tag generation for recommendations and take effect within 12 hours or more.

Rebuild your search index, then wait for the sync to complete before testing your search results.

Autocomplete Controls

Autocomplete Controls in Commerce Search v3 help you customize how search suggestions appear, making it easier for shoppers to find what they need as they type. Go to Marketing > Commerce Search v3 > Autocomplete Controls > Edit Settings.

Search v3 - Autocomplete Controls.png

You can edit the following:

  • Matching Order
  • Suggestion Count
  • Minimum Length to Trigger

Click Save Settings when finished. Rebuild your search index and test the search.

FAQs

I am experiencing a search result mismatch with two-way synonyms. What should I do?

If you have a search result mismatch when using two-way synonyms (for example, one term returns 128 results, while another returns 604 results), you may benefit from using replacements instead.

When using two-way synonyms, you must consider the following:

  1. Synonyms do not alter the original query – When two terms are defined as two-way synonyms, the system expands the query but does not rewrite it. This means that searching for term A returns results primarily related to A with some overlap from B. Searching for term B returns results primarily related to B with some overlap from A. However, the total results may be less than A and B combined.
  2. Synonyms do not guarantee identical results – Even if two terms are linked as synonyms, the search results may differ due to how the system interprets their relevance and context. For example, if "laptop bags" and "luggage" are set as two-way synonyms, a search for luggage might return results for luggage, suitcase, and laptop bags (because "suitcase" is already associated with "luggage"). A search for laptop bags might only include "luggage" as a synonym but not suitcase, leading to fewer results.

If you use brand names or material identifiers as two-way synonyms instead of general-purpose words, the synonym expansions may not behave as expected, and the results for each term may vary.

You should use a Replacement Control, which rewrites the query directly for more consistent results across all variations of the term.