3

I was disheartened to see this in the Sitecore docs:

Important

Search result boosting works in Solr version 6.6 or earlier, but Solr changed the implementation in Solr 7, and later versions. Therefore, search result boosting is broken in Sitecore 9.1, 9.2, and 9.3.

In SItecore 10, and later, item-level boosting works again, but field-level boosting does not. Sitecore stores the item boosting factor in a separate field in the Solr index ((__boost : pfloat). Sitecore uses the value in this field for boosting.

Has anyone figured out a workaround for this?

Specificaly, I have a index with items from two data sources - so the datasource field in the index is "sitecore" for my sitecore items and the other is "customdatasource". I was trying to boost when this field equaled Sitecore, so the sitecore results returned first.

0

By default, results are sorted by a "score" field. You can use this to your advantage by creating your own "boost" computed field and populating it according to your rules. Then, when fetching results, use OrderBy() and ThenBy() to sort them by "boost", then by "score" field, or the other way around as needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.