Products boost rules
Products boost rules allow you to increase or decrease this rank based on item properties, enabling you to move certain products to the top or bottom of the list. This can be extremely useful for promotion and marketing purposes.
When the Mirasvit Search extension builds search results, it groups them by the indexes' position and their placement in Searchable content. The groups can include Products, Pages, Categories, and more, and can be defined in System -> Search Management -> Search Indexes.
However, within these groups, items are listed strictly by their relevance to the search query, which is calculated individually for each item as its rank. The position in the search results list depends on this rank value.
In the latest module versions, the Products boost rules works as follows: when you search for any term and the product matches this term along with the criteria from the rule (such as Category or SKU conditions), its score will be adjusted according to the Score factor configured in the rule.
Please note that the rule will not be applied to the product if another search weight correction feature is used — the special option Search weight, added by our extension to the general settings of the product edit pages. This attribute serves the same purpose as boost rules and can have a + or - value (to increase or decrease the score) but should be set individually per product.
Managing boost rules
Score Boost Rule list available in System -> Search Management -> Product Boost Rules section.
The following fields available:
- ID: ID of the item
- Title: internal name of the boost rule
- Is active: status of the boost rule
- Conditions: detailed conditions implemented for the rule
- Active from: start date of the rule
- Active to: end date of the rule
- Action: actions on the selected items in the queue:
- Edit: allows you to view detailed information
- Apply: applies the created rule to products
- Delete: deletes the item
Boost rule management
Select Action -> Edit to view more details about the selected item. You can edit next fields:
- Title: internal title of the rule
- Active: whether the rule is active and should be applied to Search Results
- Active from/to: a time period, when the rule should apply to Search Results. Leave this field empty to have the Rule always be applicable
- Store: storeviews, where the current rule should be applicable
- Score Factor: score adjustment, which should be added or subtracted from the rating, generated by a search engine
- Action:
- Increase by / Decrease by - score adjustment
- Rank adjustment: numerical value, which should be added or subtracted from rating
- Metric: defines, how Rank adjustment shall be used for adjustment:
- Points: in this case, Rank adjustment is just added to the actual rating
- Times: in this case, the actual rating is multiplied by Rank adjustment. It is used to rocket-jump products to the top (for example, promotional products)
- Parameter: defines which rating shall be adjusted by the Rule:
- Initial score: the rating which was generated by search engine
- Product popularity: the popularity rating, which is defined as the quantity of orders of products that meet conditions below
- Product Rating: product rating, that is defined as quantity of reviews for products, that meet conditions below
- Action:
- Apply the rule only for the following products: allows you to define which combination of products makes the Rule apply. These conditions use the same pattern, as with other rules in Magento 2, and are enclosed into logical blocks
If ALL of these conditions are TRUE/FALSE
(the products meet conditions, when all of them apply) orIf ANY of these conditions are TRUE/FALSE
(product shall meet only one of defined conditions).
To add additional conditions please go to Stores -> Attributes -> Product, select a necessary attribute, for example, SKU
, open edition in the tab Storefront Properties, and set Yes
for the Use for Promo Rule Conditions, clean Magento cache after saving.
Apply and verify the boost rule
The Apply Now button is used for the immediate application of the rule. To check the result, use the Preview button at the top of the page. After clicking it, a pop-up window opens with basic information about the products and their score factors:
- Score Factor Configured: the obtained change in the score factor
- Actual values:
- Original Score | Score | Plus | Multiply: a detailed breakdown of the obtained scores
- ID: the ID of the item
- Thumbnail: a thumbnail image of the product
- Name: the product name
- Attribute Set: the set of attributes assigned to the product
- Status: displays the product’s availability on the website
- Type: the type of product
- SKU: the product identifier
- Price: the product’s price
- Quantity: the number of available products
- Store View: the store views where the current rule should be applicable
Bottom are few useful examples that demonstrate how the Product boost rules work.
Examples
Use the examples below to display products in the desired order.
Erin recommends promo
This example allows you to move products that were recommended by your editorial board (defined here by the custom attribute Erin recommends), to the top of the search results.
Title: Erin recommends promo
Score factor: Increase by 10
points Initial Score Apply the rule only for the following products:
- Erin Recommends is
Yes
Analog watches to the end
This rule drops all analog watches to the very bottom when a customer search includes the watch
keyword.
Title: Analog watches to end
Score Factor: Decrease by 2 times
Initial Score Apply the rule only for the following products:
- Product Name contains
analog
New products promo
This example allows you to lift promotional products higher on the list than others, but not necessarily at the top.
Title: New products promo
Score Factor: increase by 5 points
Initial Score Apply the rule only for the following products:
- New is
Yes