The Ranking screen lets us apply “boost” multipliers to relevance scores of result items that meet special criteria. View our Ranking video for a brief demonstration.
Ranking is a Profile-level feature.
Go to Site Search > Configurations > Advanced Configurations > Ranking.
Smart Ranking
Enable Smart Ranking: Enable or disable the Site Search Smart Ranking feature. Smart Ranking reorders search results to match the searcher’s intent.
Field Ranking
Enable Field Ranking: Enable or disable various boost features that are configured from this screen.
- Search Field: If there is a match within a specific field, boost the item’s relevance score.
- Field Value: If a field contains a specific value (whether matched or not), boost the item’s relevance score.
- Function: Boost the item’s relevance score based on a value returned by a function.
Enter a ranking boost value to control how much each ranking configuration influences relevance. Search Field and Function boosts support values from 0 to 100. Field Value boosts support values from -10 to 100. Decimal values are supported. A default, unboosted field has a boost multiplier of 1.
Search Field
To boost results when a query matches a specific field, select Search Field, choose the field, select +, and enter a ranking boost value.
Use the Field Type dropdown to narrow the field list before selecting or searching for a field. This can help when an app has many indexed fields, especially when you only want to use fields of a specific type.
Note the Reload Schema icon above the list of fields. If you can’t find a field in the list, try reloading the schema. Changes to your website’s Solr schema are not automatically updated in Site Search.
Field Value
To create a boost based on the presence of a specific field value in the result item, select the “Field Value” option and then fill in the field name and the desired value.
The Field Type dropdown is also available for Field Value ranking rules. Select a field type to narrow the available fields, then choose the field and enter the value you want to boost.
Function
Location-Based Search
The Location feature can place a distance_boost() item in this list.
To calculate a partial relevance score based on the value of a field, select the Function option and enter a Solr Function Query expression. Select + to add the function, then enter a ranking boost value.
No Spaces!
The function syntax does not tolerate spaces. It will fail to Publish until you remove them.
Some example functions you can use are:
- To boost if the field ‘sitename’ contains ‘Public’:
termfreq(sitename,'Public') - To boost by a date field, ‘publish_date’:
recip(ms(NOW,publish_date),3.16e-11,10,1)
Click the Save Draft button before you leave or refresh a page. Otherwise, changes can be lost. The Publish button makes this Search Profile available to the Preview screen.
When you save a draft, Site Search shows a blue dot in the navigation menu to indicate pending changes for the current app, language, and search profile. The configuration page also shows a banner. Status banners show pending draft, saved draft, and published states.