Ranking search results in Kentico

This post shows how you could override search results order.


Recently I received the request from the client to build search results page. This page should be a default search results, where all results are ordered by relevance, except there are items (pages), those should appear always at the top of others results, even if they match search criteria just once.


I started to look for solutions and, at the very beginning, I thought about different types of customization: custom search results web part, overriding built in search functionality, etc. But I was enough lucky to come out with really simple solution, which does not require customization (customization is evil!), and I'd like to share my approach with you.

So I decided to add Search Rank field to the page type(s), which will need to appear on the very topo in the results. I setup zero as a default value for that fields. So all pages of the type will be assigned to zero by default. If we need some particular result to appear at the top, all we need is just specifying any positive number for the fields. Also you can differentiate pages, those appear before all other assigning different Search Rank to them, e.g.: pages with Search Rank equal 1 appears before regular search results; pages with Search Rank equals 5 are more import and appears before pages with Search rank equal 1; Items with Search Rank equal 10 are the most important and appears at the very top of the search results list.

Next step we have to make is including Search Rank field into a search index. This could be done in Page Types application by editing appropriate Page Type Search fields. Just navigate SearchRank field and check Content and Searchable check boxes, save changes.

Now we need to rebuild search index(es) used by the Smart search results web part on the search results page. So open Smart Search application, navigate appropriate Search Index and click rebuild.

The step in this process is setting up correct search order for the Smart search results. It should be following:

SearchRank desc, ##SCORE##

Okay, we are done from technical stand point. The only thing we left is content editors' piece, which requires going and populating Search Rank field for needed documents.


So you can see that suggested approach is really simple, easy to implement and does not require customization, which always is a huge advantage. It allows us to combine together Kentico out of the box functionality with requirement specific one in order to meet our goal. I believe that this could be useful in many other scenarion, those are not described in this post.

If you have any question on the approach, or want to share your experience solving similar problems - just leave your comment under the post. I really appreciate any feedback.

I just want to let you know that I just check out your site and I find it very interesting and informative.
2/18/2018 6:19:00 AM

Best Televisions
Awesome post,! Really loving this articles. I have been searching the Internet for fun and last night I got it. Thanks for sharing us your essential article.
2/17/2018 8:46:31 AM

app apk download
The post of your article is amazing and interesting, visit our web app apk download at
http://appapk.download/, to get info about android apps apk download free
2/8/2018 2:59:40 AM

iphone apk download
I see the article on your web very good and interesting ,, do not forget visit also my web iphone apk download - http://iphoneapk.download/
You can get info about all of latest update iphone ios apk download
2/7/2018 10:10:43 AM

app update download
your writing is very interesting, visit our web to get info on update app download last version for android, on app update download - http://appupdate.download/
2/7/2018 9:00:30 AM

app download 2018
Your website is very interesting, visit our web to get info about all apps apk download 2018 for android smartphone, in app download 2018 - http://appdownload2018.website/
2/7/2018 8:54:51 AM

app for windows download
Your web is very interesting, visit our web to get info about Download app for PC Dekstop Laptop Windows, in app for windows download - http://appforwindows.download/
2/7/2018 7:34:45 AM

app for pc windows
I see your article in your web very nice and interesting ,, do not forget visit also my web at app for pc windows - http://appforpcwindows.download/
. You can get info about apps for pc windows 10/8/7 free download
2/7/2018 6:54:43 AM

app for mac download
Your article is interesting, visit also our web. Get everything about mac app store download free at app for mac download - http://appformac.download/
Please check for the most popular apps
2/7/2018 3:30:13 AM

app for iphone download
Hi, i am very interested in your website, check also our web at app for iphone download
And get info about Download app for iphone IOs & Android for free
2/6/2018 9:26:02 AM

app 2018 download
I am very interested in your article, visit also our web at app 2018 download
Get info about Latest app version update on 2018 download free
2/6/2018 8:06:06 AM

Best App Market
Your articles are very interesting, check our web as well at Best App Market
There you can get info about Best App Market to download app/apk for android/iOs
2/6/2018 5:00:00 AM

apk for ios Download
your article is very good and the information is interesting ,, do not forget visit also my web apk for ios Download
You can get info about Download apk for ios for free
2/6/2018 3:47:57 AM

hallo, I see your web very nice and interesting ,, do not forget visit also my web android game download
You can get info about Popular android games download list for free
2/5/2018 8:01:21 AM

hallo, i see your web very nice and interesting ,, do not forget

visit also my web app1 download
You can get info about app download free for android iOs
2/5/2018 5:49:04 AM

Mass Texting
Really good one idea you have to share with us! it is very helpful for the search result queries keep it up my friend thank you!
1/8/2018 8:22:43 AM

denver divorce lawyer
As a big name, an alone charge be accustomed to fact in the available eye and in the highlight dependably. Every last mishap of a superstar's action gets emphasize by the media and brief the open are side by side about it. On the off chance that a big name gets married, again it is furthermore a favored rupture for the admirers and comparably a big name decrease is a heft of actuated squabble and conviction for the acknowledged open.
12/24/2017 6:07:20 AM

تور تایلند
Nice post. Thank you for the info. Keep it up.
12/23/2017 11:32:20 AM

kitchen remodeling yonkers
Custom Kitchen Adjustment is a little added assignment than artlessly adjustment your kitchen with a professional. However, you will save yourself money and cephalalgia in the end.
12/16/2017 3:31:21 PM

juegos friv gratis
Nice looking sites and great work. Pretty nice information. It has a better understanding. Thanks for spending time on it.
12/9/2017 8:33:30 AM

swiss replica watches
11/17/2017 3:37:58 AM

Percy Jackson
It is quite informative.
11/8/2017 10:59:27 AM

latest list of apps like terrarium tv
terrarium tv is most used movie app in recent times with awesome features but sometimes it is not working with an overload of users at that moment apps like terrarium tv is a benefit for us
9/11/2017 3:51:38 PM

reset password
I think this new kit will be ideal for using in aquariums which are placed in a dark place. The led lighting will add some excitement to the viewers. Can you please share the colors that are available so that we can choose the best one.
8/24/2017 10:57:51 AM

drug and alcohol programs in Colorado
Any blog really are awesome! You've gotten conditioned others which i may well come up with as cool as Document truly reckoned We can.
7/26/2017 1:25:28 PM

hot sale replica watches
Out of work, party, you may need a watch to reflect your temperament and vision, to show you different from the general taste and vision. Here to meet your needs. thank.
5/15/2017 6:33:41 AM

s a month, if you can get a prescription for those amounts.
5/12/2017 1:49:41 PM

old computer equipment disposal
Interesting topic for a blog. I have been searching the Internet for fun and came upon your website. Fabulous post. Thanks a ton for sharing your knowledge! It is great to see that some people still put in an effort into managing their websites. I'll be sure to check back again real soon.
4/10/2017 10:44:34 AM

good one.
4/4/2017 6:12:50 PM

Ilesh Mistry
Hi Roman

This is a great tip!!! Especially for those times when the clients want specific pages to be at the top in the results.

11/4/2015 8:40:35 AM

 Security code