SOLR Search Result Order Different due to the _val_:__boost function

After upgrading the project to Sitecore version 10.2, the SOLR search result is different in order due to the query _val_:__boost function. I have investigated the issue and found out that in Sitecore 9.0.2 our SOLR search query was:

 ..........AND (-_template:("083a4d2a38694013a9e2d18c05da70ae") *:*))  

and in Sitecore 10.2 SOLR search query is:

 ..........AND (-_template:("083a4d2a38694013a9e2d18c05da70ae") *:*)) AND _val_:__boost  

There is one more extra condition at last in the query i.e. AND _val_:__boost. I have gone through the Sitecore documents on Search Result Boosting and found that 

In Sitecore XP 10.0.0 or later, item-level boosting relies on index-time scoring factors that are indexed in the __boost field and combined with the query score using the query _val_:__boost function.

After doing lots of brainstorming I raised a support ticket to the Sitecore and find the below solution:

Solution:

Sitecore suggested two approaches:

  1. To achieve the desired behavior comment out all of the processors in the <indexing.resolveItemBoost> pipeline and rebuild the search indexes. You can write a patch file for this.
  2. Alternatively, restore the original state of the pipeline. Clear the value of the Boost field ('{93D1B217-B8F4-462E-BABF-68298C9CE667}') for every item. Remove any boosting rules under
    • /sitecore/system/Settings/Rules/Indexing and Search/Item Rules
    • /sitecore/system/Settings/Rules/Indexing and Search/Global Rules
    Rebuild the search indexes.

Note: The latter approach is recommended as it does not require changing the behavior of the product.

Sitecore

Happy Sitecoreing ðŸ˜Š

Comments

Popular posts from this blog

Sitecore Installation Error: Failed to Start Service 'Sitecore Marketing Automation Engine'

Import CSV Data in Sitecore Using PowerShell: Part-3

Sitecore Technology MVP Journey 2022