Purpose
This article explains how the match rate is calculated for a product when performing a search for a specific term. In this article, we will describe how to calculate the match rate for a search term.
Requirements
Understanding of search configuration in Fredhopper
Match rate calculation rules
The linguistic ranking formula computes the linguistic match rate as
follows:
- Every unique match of a term in a search field counts as 1; the number
of matches per field is not considered. - Every unique match of a term is multiplied by the weight of the search
field to compute the term field match rate. - The term match rate is the sum of the term field match rates for all
relevant fields. - The phrase match rate is the sum of the term match rates.
- The weighted phrase match rate is the phrase match rate multiplied by
the weight of the search pass. - For matches in multiple search passes, the highest match rate will
count.
How match rate is calculated
In this example, the user is searching for "dress" keyword. The search result returns "EXACT" and "EXACT DESC" search passes and the first item shows match rate of "4"
1- First step to determine how the match rate is calculated is to extract all the enabled "search fields" for the returning search passes from Merchandising studio -> system -> search -> search passes -> click on the search pass that returned from searching of the keyword, for example:
In the example search for "dress", we have 2 search passes in the result, and the enabled search fields for each search passes are:
- "EXACT" search pass:
Choose_from
Collection
Colours
Cut
Department
Dress_length
Fabric
Kids_age_group
Kids_gender
Kids_material
Kids_pattern
Kids_product_type
Name
Product_range
Search_categories
Sizes
Sleeve_length
Style
Type - "EXACT DESC" search pass:
Choose_from
Collection
Colours
Cut
Department
Description
Dress_length
Fabric
Kids_age_group
Kids_gender
Kids_material
Kids_pattern
Kids_product_type
Name
Pattern
Product_range
Search_categories
Sizes
Sleeve_length
Style
Type Where the bold ones are the fields over which the search is triggered.
2- The next step is to extract all attributes (i.e. their "Display name") which contain the stemmed value of the first term:
In our example, the search term "dress" appeared in the values of the following attributes:
Display Name:search_categories_globalproductcatalogonline (5 times)
Display Name:categories ( 3 times) -> not used in search index
Display Name:Variant data(Attribute name:vdata) ( 5 times ) -> not used in search index
Display Name:Type(Attribute name:producttype) ( 3 times )
Display Name:name ( 1 times)
Display Name:description ( 1 times)Note: As mentioned in the rules, the number of matches per field is not considered, so even if the search term is matched 5 times for search_categories_globalproductcatalogonline, this will be calculated as "1"
3- The next step is to match the attributes with the extracted enabled search fields from the previous step for a search pass. Please note because search field could contain multiple attributes combined in one field, hence you have to do this step from system -> search -> search index page
In our example, for "EXACT" search pass the search term "dress" matched in the following enabled search fields
Name -> 1 match for globalo_155594_ivory
Search_categories --> 5 match for globalo_155594_ivory
Type -> 4 match for globalo_155594_ivory And for "EXACT DESC"
Description -> 1 match for globalo_155594_ivory
Name -> 1 match for globalo_155594_ivory
Search_categories --> 5 match for globalo_155594_ivory
Type -> 4 match for globalo_155594_ivory 4- The next step is to calculate the weight of each search term. This is calculated by multiplying every unique match of a term by the weight of the search field (in the given search pass):
In our example, the calculation will be:
- "Exact" search pass:
Name: ( 1 * Relevancy (1) = 1)
Search_categories ( 1 * Relevancy (1) = 1)
Type ( 1 * Relevancy (1) = 1)
- "Exact DESC" search pass:
Description: ( 1 * Relevancy (1) = 1)
Name: ( 1 * Relevancy (1) = 1)
Search_categories: ( 1 * Relevancy (1) = 1)
Type: ( 1 * Relevancy (1) = 1)
5- Next, the term match rate should be calculated, and it is the sum of the term field match rates for all relevant fields. In our example:
- "Exact" search pass:
Name(1)+Search_categories(1)+Type (1) = 3
- "Exact DESC" search pass:
Description(1)+ Name(1)+Search_categories(1)+Type (1) = 4
6- The next step is to calculate the phrase match rate, which is the sum of the term match rates.
In our example, because we only have one term, "dress", hence this step will be skipped. But if you have multiple search terms like "red dress", then you have to calculate the match rate for each term and then calculate the sum as per this step.
7- The following step shows how to calculate the weighted phrase match rate by multiplying the phrase match rate by the weight of the search pass ( relevancy of the search pass):
in our example:
- "Exact" search pass:
Phrase match rate (3) * relevancy(1) = 3
- "Exact DESC" search pass:
Phrase match rate (4) * relevancy(1) = 4
8- In the case of matches in multiple search passes, the highest match rate will count.
In our example, we have 2 search passes that are returned in the result of the search phrase; these are "EXACT" and "EXACT DESC", FAS will take into count the highest value which in this case for "EXACT DESC" = (4). As you can see this the same value which appears for the match rate for this product:
Help!I cannot get the match rates to add up
NOTE: Match rates are affected by the synonyms depending on the operator used (see the table below)
You may need to review the synonyms generated by the searched term, once you have the additional terms ,you will need to add them into your match rate calculation.
Operator | Synonym Syntax | Description |
|---|---|---|
| Equals | = |
Both terms effectively mean the same thing, e.g. tv and television; therefore the synonym created is "tv = television", and therefore have an equal match rate: tv (1) = television (1) |
| Contains | > | Additional words should only be linked in one direction: "Clothing > Tops, Shirts, Skirts, Coats, Jackets, Dresses" this means that if "clothing" was the search term used by a shopper, the results would include; Tops, Shirts, Skirts, Coats, Jackets and Dresses. The term on the right has half the match rate of the term on the left: Clothing (1) > Tops (0.5), Shirts (0.5), Skirts (0.5), Coats (0.5), Jackets (0.5), Dresses (0.5) |
| Similar | ~ | The first term is more relevant than the second, but all relevant products should still be returned, e.g. "Jumper ~ Sweatshirt". If the shopper searched "jumper" Fredhopper would return products for jumpers and sweatshirts, in that order. If the shopper searched for sweatshirts, then the relevant sweatshirts and jumpers would be returned, in that order. The term on the right receives a significantly lower match rate score (0.1), so will feature at the bottom of the result set, unless the match rate is blended: Jumper (1) ~ Sweatshirt (0.1) |
Comments
0 comments
Please sign in to leave a comment.