This article provides a non-technical overview of the components that affect search results rankings. Understanding these components is critical to improving how your content is surfaced in customer search queries. For the purposes of this article, the components put into the following groups: Search Types, Query Types, Indexable Fields, Product Search, and Boosting & Search Result Rankings.
Search document types
There are three types of search documents:
- Product – this is used for both autocomplete results and full product search results
- Category – this is used to populate the autocomplete with categories
- Content – this is used to populate autocomplete with content
There is an index of certain fields for each search type (defined below). These fields have their corresponding search type identified in the Admin Console.
Query types
There are six types of "boostable" queries found within the Search Boosting section of the Admin Console (Admin Console > Marketing > Search > Indexing Options):
Query Type |
Description |
Queried Fields |
---|---|---|
Customer Product Number |
Looks for matches that are specific to the product numbers of the current bill to or ship to. |
Customer Product Number
|
Fuzzy |
Looks for matches that are dependent on the fuzzy search settings. |
ShortDescription and Category Names |
Phrase |
Looks for 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 |
Looks for 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 |
This query looks for exact matches 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 |
Looks for exact matches 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 Elasticsearch fields that are either required to be indexed or can be toggled to be included or excluded from the index. Any custom properties added to products or categories are indexable; however, they are not indexed by default, but can be enabled for indexing via the Application Dictionary.
The following list of Elasticsearch fields is mapped to one or multiple fields in the Configured Commerce database. 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. The exact scoring formula is complex and controlled by Elasticsearch; any adjustments to boosting should be tested with a number of queries to verify that the results are as desired.
Product search
- CategoryNames – Indexed by Default with default boost of 1
This field includes the name of all categories associated to a product. Hits on any category name will influence the search results for products within that category.
- Content – Indexed by Default with default boost of .9
This field includes the currently published content on product.
- ErpNumber – Required to be indexed with default boost of 3
This field maps to the product number on product.
- FilterNames – Required to be indexed with default boost of .8
This field 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 – Indexed by default with default boost of 3
This field maps to the Product Manufacturer Item field on the product.
- ShortDescription – Required to be indexed with default boost of 5
This field maps to the Product Title field on the product.
- Specifications – Indexed by default with default with default boost of .9
This field includes currently published content for all specifications on the product.
- StyledChildren – Required to be indexed with default boost of .8
This field 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 on the child product. Hits on these fields will influence results for the parent product.
- UnitOfMeasure – Not indexed by default.
This field maps to the Unit of Measure field on product.
- ProductCode – Indexed by default with default boost of 1
This field maps to the Product Code field on product.
- ErpDescription – Indexed by default with default boost of 1
This field maps to the ERP Description field on product.
- MetaKeywords – Indexed by default with default boost of 1
This field maps to the Meta Keywords field on product content.
- MetaDescription – Indexed by default with default boost of 1
This field maps to the Meta Description field on product content.
- Pagetitle – Indexed by default with default boost of 1
This field maps to the Page Title field on product content.
- ModelNumber – Indexed by default with default boost of 1
This field maps to the Model Number field on product.
- SKU – Not indexed by default.
This field maps to the SKU field on product.
- UPCCode – Not indexed by default.
This field maps to the UPCCode field on product.
- UNSPSC – Not indexed by default.
This field maps to the UNSPSC field on product.
- PackDescription – Not indexed by default.
This field maps to the Pack Description field on product.
- UnitOfMeasureDescription – Not indexed by default.
This field maps to the Unit of Measure Description field on product.
- Vendor – Not indexed by default.
This field contains values from the Vendor Name and Vendor Number for vendors associated with products.
- DocumentName – Not indexed by default.
This field maps to the Name field on documents which are assigned to products.
- ImageAltText – Not indexed by default.
This field combines the Alt Text values for all images on a product.
Category search
- Name – Required to be indexed with default boost of 3
This field maps to the Category Name field.
- ShortDescription – Required to be indexed with default boost of 5
This field maps to the Category Title field.
- PageTitle – Indexed by default with default boost of 1
This field maps to the content Page Title field for category.
- MetaDescription – Indexed by default with default boost of 1
This field maps to the content Meta Description field for category.
- MetaKeywords – Indexed by default with default boost of 1
This field maps to the content Meta Keywords field for category.
- Content – Indexed by default with default boost of 1
This field includes currently published content on category.
- ParentCategoryShortDescription – Required to be indexed with default boost of 1
This field maps to the Category Title field of parent categories. Hits on a parent category name will have an influence on the ranking of their respective child categories.
Content search
- Title – Indexed by default with default boost of 1
This field maps to the CMS page Title.
- MetaKeywords – Indexed by default with default boost of 1
This field maps to the CMS page Meta Keywords.
- MetaDescription – Indexed by default with default boost of 1
This field maps to the CMS page Meta Description.
- Body – Indexed by default with default boost of 1
This field includes the content entered in the summary for the CMS page.
Boosting & search result rankings
Boosting allows us to enter values within the Configured Commerce console that change how Elasticsearch calculates scores for the order of search results. The boost values entered in the Admin Console are multiplied by the score returned by Elasticsearch for that match. Therefore, a value less than 1 will reduce the importance of the field, query, category, or product in search rankings, a value greater than 1 will increase the importance, and a value of 1 will have no impact. The exact formula for how Elasticsearch determines the base score for any match may vary by query type match or other factors. Because the ranking scores are determined within Elasticsearch and not Configured Commerce, the exact sequencing of logic used to determine rankings is not known; however, the following list is the general construct of behavior:
- For each type of search (product, content, category), Elasticsearch executes the appropriate queries against the Elasticsearch index. The appropriate queries for each search type look for matches in their defined sets of fields.
- If a match is found in the product search for any of the query types, Elasticsearch considers that product to be a "hit" and creates a score for the match.
- Based on which query returned a match, the score for each match is modified by query boosting defined within the Admin Console.
- Based on which field returned a match, the score for each match is further modified by field boosting defined in the Admin Console.
- The scores of all matches for the product are added up.
- Applicable product and category boosting for the product is then calculated to return the final search score.
- Sponsored products display at the top of the search results and the other results display based on their score.
- Previously purchased products, if enabled, that fall within the defined lookback period are boosted in the search results based on the multipliers in either the frequently purchased or less frequently purchased thresholds.
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 Elasticsearch 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
For 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
For 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
Please sign in to leave a comment.