Pimp up your search (part 2)

blog header image

A common wish for people owning a web site search engine is to be able to directly influence the ranking - like boosting a certain page for some specific keywords. The built-in search in EPiServer CMS is very plain and simple and doesn't seem to have any advanced functionality. But it's simplicity also makes it easy to fool. The ranking of search results is very dependent on the amount of times a word appears on a page. But here's the trick - the word doesn't actually have to visually appear on a page that many times to get good ranking in a search result. It just needs to be indexed a lot of times for a given page - something that's easily achieved by adding the word X number of times in a page property (marked as searchable). Whether the property is actually shown to the end-user on a page has no influence on the search what-so-ever.

On my test-site, I wanted to boost the ranking of the page in the bottom of the search results for the word "episerver", so I just added a string property to the page-type, went to the page in edit-mode and typed the word into the property (seperated by comma) around 20 times. This might not be the most graceful way to change a result-page ranking, but it works, performs well and best of all it's simple. Here's a quick and easy challenge for you: build a custom property where you can just list the words that needs to be boosted, which then hidden for the editor makes sure the words are added X times to the page's search index.

Note that after you change a page and publish it, an indexing job is put in the pipeline to be executed 30 seconds later - which means that it usually takes around half a minute for changes to be updated in the built-in search.

Recent posts