Boosting Smart Search Results in Kentico

Boosting Smart Search Results in Kentico

Kentico out-of-the-box provides an index-based search engine called “Smart Search”. The “Smart Search” is based on Lucene.Net which is a high performance search engine library and an open source search project that powers the most powerful search tools. Lucene.Net is a port of the Lucene search engine library, written in C# for .NET runtime users.

The “Smart Search” uses search indexes to store website content. When a search request is made, the system searches through the appropriate search indexes; way faster and better performance compared to a normal SQL query search.

This article will not explain how to set up the “Smart Search” on your system. Here’s more info on how to do that.

Search Result Score Boosting

Search result score boosting is the process of altering the search result ranking up or down based on an algorithm.

By default only the web page content is ranked (Title & Description). This really doesn’t reflect the real relevance of the page.

A web page with the search keyword in the title would be more important than pages containing the same search keyword just in the description.

With score boosting we can increase the page ranking so it will appear at the top of the search results.

By using the Search Condition field on the Smart search results webpart we can alter the relevancy score of the search results.
Boosting Smart Search Results in Kentico

Lucene.Net engine allows three different boosting levels:

Document Level – Index Time Boosting
Field Level – Index Time Boosting
Query Level – Query Time Boosting

The difference between these three levels is when the boosting is applied. With Document Level and Field Level, the boosting is written into the index, which increases performance and storage efficiency. O the other hand, the Query Level is more flexible and can achieve the same results as the other two but requires a bit more computing power.

Promote Featured Content

There are cases when we want to bump pages at the top of the search results. The following steps will show you how to easily do that.

Head over to to the Kentico dashboard and look for “Page Types”. For this example we assume you use the “Page (menu item)” page type, which is the most used page type.
Open the “Page (menu item)” page type and click the Fields section to create a new field called “isFeatured” with these fields: Field name, Data type: Boolean (Yes/No), Field caption, Explanation text, Form control: Check box, and Save.
Boosting Smart Search Results in Kentico

Now, go to Search Fields section and look at the bottom of the list for your new field: isFeatured.
On the “Custom search name” column next to isFeatured field type your field name: isFeatured and make sure you select the “Searchable” checkbox and hit Save.
Boosting Smart Search Results in Kentico

Now, go to your main search page and customize the “Smart search results” web part, in particular the “Search condition” field.
Enter the following value which will boost the content by a factor of 3: isFeatured:(true)^3

isFeatured:(true)^3

Boosting Smart Search Results in Kentico

If you want to increase that boost more you can increase the boost factor by 4 or 5. You also have the option to boost the content just a little by using a decimal value. Example: isFeatured:(true)^0.5.

You can also add multiple conditions to the Search condition. Example: isFeatured:(true)^2 isPodcast(true)^3 isArticle(true)^5

Now, once the search boosting set-up is done, you need to edit your page you would like to be boosted at the top of the search results.

Go to your page and make sure the isFeatured checkbox is checked.
Boosting Smart Search Results in Kentico