Understand search ranking and relevance

  • Updated

This article provides a non-technical overview of the components that affect search results rankings. By understanding these components, you can improve how your content shows in customer search queries.

Search document types

There are three types of search documents:

  • Product – Used for both autocomplete results and full product search results.
  • Category – Used to populate the autocomplete with categories.
  • Content – Used to populate autocomplete with content.

Each search type has an index of certain fields, identified in the Admin Console.

Query types

The Search Boosting section of the Admin Console contains six types of queries (Admin Console > Marketing > Search > Indexing Options):

Query Type

Description

Queried Fields

Customer Product Number

Matches to the product numbers of the current bill to or ship to.

Customer Product Number

Fuzzy

Matches dependent on the fuzzy search settings.

ShortDescription and Category Names

Phrase

An exact match on the entire text of the search query.

Name, StyledChildren, ErpNumber, ErpNumberWithoutSpecialCharacters, ShortDescription, CategoryNames, ManufacturerItem, ManufacturerItemWithoutSpecialCharacters, Filternames, SearchLookup, Content and Specifications

 

Prefix

An exact match on the initial words of a phrase and partial match on the last word in the query.

Name, StyledChildren, ErpNumber, ErpNumberWithoutSpecialCharacters, ShortDescription, CategoryNames, ManufacturerItem,ManufacturerItemWithoutSpecialCharacters, Filternames, SearchLookup, Content and Specifications

 

Search Within

An exact match on individual words and is used to narrow search results by filtering out non-matches within the existing results.

Name, StyledChildren, ErpNumber, ErpNumberWithoutSpecialCharacters, ShortDescription, CategoryNames, ManufacturerItem, ManufacturerItemWithoutSpecialCharacters, Filternames, SearchLookup, Content and Specifications

 

Word

An exact match for individual words included in the search query

Name, StyledChildren, ErpNumber, ErpNumberWithoutSpecialCharacters, ShortDescription, CategoryNames, ManufacturerItem, ManufacturerItemWithoutSpecialCharacters, Filternames, SearchLookup, Content and Specifications

 

Indexable fields

There are 34 indexable search fields that are either required or you can toggle to be included or excluded. You can also index custom properties added to products or categories through the Application Dictionary.

The following list of search fields is mapped to one or more fields in the Configured Commerce database with these parameters:

  • Fields can be included or excluded from the index to make them queryable on the storefront.
  • Adjusting their boost value increases or decreases the rank of search results based on what fields the query matches. A positive boost value applies an integer multiplier to the search score for that field, and a negative boost value applies a fractional multiplier to the score. Because search controls the exact scoring formula, you should test any adjustments to boosting with several queries to verify you are receiving the results you want.

Product search

Field

Indexed by default

Description

CategoryNames Yes, with a boost of 1 Includes the name of all categories associated to a product. Hits on any category name influence the search results for products within that category.
Content Yes, with a boost of .9 Includes the currently published content.
ErpNumber Yes, with a boost of 3 Maps to the product number.
FilterNames Yes, with boost of .8 Contains any attribute values assigned to the product. If the attributes are assigned to the category the product is in and there is a hit on the attribute value it will influence the search results.
ManufacturerItem Yes, with a boost of 3 Maps to the Product Manufacturer Item field.
ShortDescription Yes, with a boost of 5

Maps to the Product Title field.

Specifications Yes, with a boost of .9

Includes currently published content for all specifications on the product.

StyledChildren Yes, with a boost of .8

Includes the Name, ERP Number, Manufacturer Item, Product Code and Model Number on the child product as well as the Name, Description and Value of Variant Traits. Hits on these fields will influence results for the parent product.

UnitOfMeasure No

Maps to the Unit of Measure field.

ProductCode Yes, with a boost of 1

Maps to the Product Code field.

ErpDescription Yes, with a boost of 1

Maps to the ERP Description field.

MetaKeywords Yes, with a boost of 1

Maps to the Meta Keywords field.

MetaDescription Yes, with a boost of 1

Maps to the Meta Description field.

Pagetitle Yes, with a boost of 1

Maps to the Page Title field.

ModelNumber Yes, with a boost of 1

Maps to the Model Number field.

SKU No

Maps to the SKU field.

UPCCode No

Maps to the UPCCode field.

UNSPSC No

Maps to the UNSPSC field.

Pack Description No

Maps to the Pack Description field.

UnitOfMeasureDescription No

Maps to the Unit of Measure Description field.

Vendor No

Contains values from the Vendor Name and Vendor Number for vendors associated with products.

DocumentName No

Maps to the Name field on documents assigned to products.

ImageAltText No

Combines the Alt Text values for all images on a product.

 

Category search

Field

Indexed by default

Description

Name Yes, with a boost of 3 Maps to the Category Name field.
ShortDescription Yes, with a boost of 5 Maps to the Category Title field.
PageTitle Yes, with a boost of 1 Maps to the content Page Title field.
MetaDescription Yes, with a boost of 1 Maps to the content Meta Description field.
MetaKeywords Yes, with a boost of 1 Maps to the content Meta Keywords field.
Content Yes, with a boost of 1 Includes currently published content.
ParentCategoryShortDescription Yes, with a boost of 1 Maps to the Category Title field of parent categories. Hits on a parent category name influence the ranking of their respective child categories.

Content search

Field

Indexed by default

Description

Title Yes, with a boost of 1 Maps to the CMS page Title.
MetaKeywords Yes, with a boost of 1 Maps to the CMS page Meta Keywords.
MetaDescription Yes, with a boost of 1 Maps to the CMS page Meta Description.
Body Yes, with a boost of 1 Includes the content entered in the summary for the CMS page.

 

Boosting and search result rankings

Boosting allows you to enter values within the Configured Commerce console that change how search calculates scores for the order of search results. The boost values entered in the Admin Console are multiplied by the score returned by search for that match. A value less than one reduces the importance of the field, query, category, or product in search rankings; a value greater than one increases the importance; and a value of one has no impact. The exact formula for how search determines the base score for any match may vary by query type match or other factors.

Because search rather than Configured Commerce determines the ranking scores, we do not know the exact sequencing of logic used to determine rankings; however, the following list is the general behavior:

  • Each type of search (product, content, category) executes the appropriate queries against the index, looking for matches in their defined sets of fields.
  • If the product search finds a match for any of the query types, it considers that product to be a "hit" and creates a score for the match.
  • Based on which query returned a match, query boosting defined in the Admin Console modifies the score for each match.
  • Based on which field returned a match, field boosting defined in the Admin Console modifies the score for each match.
  • The scores of all matches for the product are added up.
  • Applicable product and category boosting for the product calculates the final score.
  • Sponsored products display at the top of the search results, and the other results display based on their score.
  • If you have defined a lookback period, the search results boost previously purchased products based on the multipliers in either the frequently purchased or less frequently purchased thresholds.

Search Data Mode provides additional insights into how results score in a search.

Scenario

A hardware site has a roofing nailer and roofing nails. A customer searches for “Nailer.”

The roofing nailer has the following matches:

  • Category Name – “Nailers & Staplers” – matches fuzzy query
  • Short Description – “Roofing Nailer” – matches word query
  • Content – “Nailer” included in product description – matches word query
  • Specifications – “Nailer” included in specification content – matches word query

The roofing nails have the following matches:

  • Short Description – “Roofing Nails” - matches fuzzy query
  • Content – “Nailers” included in product description – matches fuzzy query
  • Specifications – “Nailers” included in specification content – matches fuzzy query

Assume search returns a score of 10 for any query match.

By default, we use the following boost values in Configured Commerce:

  • Word Query - 6
  • Fuzzy Query - .9
  • CategoryNames - 1
  • ShortDescription - 5
  • Content - .9
  • Specifications - .9

The roofing nailer would conceivably receive a score of 417:

  • Fuzzy CategoryNames = 10*.9*1 = 9
  • Word ShortDescription = 10*6*5 = 300
  • Word Content = 10*6*.9 = 54
  • Word Specifications = 10*6*.9 = 54

The roofing nails would conceivably receive a score of 61.2:

  • Fuzzy ShortDescription = 10*.9*5 = 45
  • Fuzzy Content = 10*.9*.9 = 8.1
  • Fuzzy Specifications = 10*.9*.9 = 8.1

Use developer tools

You can view the scoring of products on a Product Listing Page (PLP) with these steps:

  1. Go to your desired URL. We use a sandbox website for this example.
  2. Right-click on the page and click Inspect to bring up your Google Developer Tools.
  3. Search for your desired product.
  4. Go to the Network tab within the Google Developer Tools.

    mceclip1.png

  5. Find the response of the API that was hit, which starts with applyPersonalization.

    mceclip3.png

  6. Select the Preview tab and click Products.

    mceclip0.png

  7. Scroll down until you find the score of that product.

For a greater understanding of how these scores are impacted, see Understanding search ranking and relevance.

Search data mode

Use the Enable Search Data Mode in Spire CMS to view search result information, including the search scores for individual products, by searching for products within the CMS shell. For more details on factors affecting Search Data Mode results, see Understanding search ranking and relevance.

Enable Search Data Mode

Users with CMS_ContentEditor and CMS_SiteEditor roles have access to Search Data Mode.

  1. Click Site Preview and select Website to launch the Spire CMS from the Admin Console.
  2. Select Preview.
  3. Click the Settings icon, and select Enable Search Data Mode.
  4. Enter a term in the search box and click the Search icon.

    To see search data in search results, make sure that the search results are in List view.

  5. Review the Search Results page. The search scores and matching fields that contribute to the total score appear under the Search Data heading for each product. Sponsored products move to the top of search results regardless of their score.
  6. Click View More to view additional search details like the boost on the product itself and matching field scores.

Disable Search Data Mode

  1. Click the Settings icon in the CMS shell.
  2. Select Disable Search Data Mode.
  3. Wait for the setting change to refresh the page.

After you log out, the Search Data Mode automatically resets to disabled, but you can also manually disable it.