Score Boost Rules

Score Boost Rules are powerful tool, which allows you to affect relevancy of search results, depending on certain conditions.

When Mirasvit Search extension builds search results, it groups them by indexes' position and their position in System -> Search Management -> Settings -> Search Autocomplete -> Searchable Content. Groups can include Products, Pages, Categories and so on - they can be defined in System -> Search Management -> Search Indexes.

But inside these groups items are listed strictly by their relevance to search query, which calculated for each item separately as item rank. Position in search results list depends from this rank value.

Score Boost Rules allows you to increase or decrease this rank depending on item properties, which allow you to move certain products to the top or botton of list, which is extremely useful for promotion and marketing purposes.

Creating a new Rule

To create a new Score Boost Rule, navigate to System -> Search Management -> Score Boost Rules section and press Add New Rule button.

You need to define the following properties to create a Rule/

  • Title - sensical title of the Rule
  • Active - whether Rule is active and should be applied to Search Results
  • Active (date) - a time period, when Rule should apply to Search Results. Leave empty to have Rule always applicable.
  • Store - storeviews, where current Rule should be applicable.
  • Score Factor - score adjustment, that should be added or subtracted from rating, generated by search engine.
    • Action - action, that should be performed. Can have only two possible values.
      • Increase By
      • Decrease By
    • Rank Adjustment - numerical value, that should be added or subtracted from rating.
    • Metric - defines, how Rank Adjustment shall be used for adjustment. Can have two possible values:
      • Points - in this case Rank Adjustment just added to the actual rating.
      • Times - in this case actual rating is multiplied by Rank Adjustment. Used to rocket-jump products to the top (for example, promotional products).
    • Parameter - defines, which rating shall be adjusted by the Rule.
      • Initial Score - rating, which was generated by search engine.
      • Product Popularity - popularity rating, that is defined as quantity of orders with products, that meet conditions below.
      • Product Rating - product rating, that is defined as quantity of reviews for products, that meet conditions below

Conditions are broken into two parts.

  • Apply the rule only for following products - allows you to define, which combination of products makes Rule apply.

    Note

    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 the rule only when the following conditions are met - allows you to filter Search Query, to which Rule shall apply.

Both of them use the same pattern, as other rules in Magento 2, and enclosed into logical blocks If ALL of these conditions are TRUE/FALSE (products meet conditions, when all of them apply) or If ANY of these conditions are TRUE/FALSE (product shall meet only one of defined conditions).

Here are few useful examples, that demonstrate, how Score Boost Rules work.

Examples

  • Erin Recommends Promo

    This example allows you to move products, that were recommended by your editorial board (it is defined by custom attribute Erin Recommends), to the top of 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 to the very bottom all analog watches, when customer search includes "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 Apply the rule only when the following conditions are met:
    • Search Query contains watch

     

  • New Products Promo

    This example allows you to uplift promotional products higher than others, but not necessary 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