Rendering popular queries on the search page


Kunskapsdatabasen, Söksidan

SiteSeeker allows you to present the most popular search queries on the search page.

The 'Popular Queries' components quickly help you to get started. In order for you to display popular queries on your page, you need to add the following code:

<%=helpers.PopularQueries(10, "/my_search_page.aspx")%>


<%=helpers.PopularQueries("sv", 10, "/my_search_page.aspx")%>

This will fetch at most ten popular queries. If fewer queries are available, it will return less than the specified number 10.

The first call without the language parameter, will use the language setting as specified per the search page's language setting.

The second overloaded call with the language parameter, will override the search page's language setting.

It builds a search url for each query using the relative path /my_search_page.aspx

Note that you will need to enable 'Most popular queries' in the SiteSeeker Admin interface to be able to retrieve popular queries.


The 'Popular queries' component can be configured with a caching algorithm which fits your business requirements. By default the cache will expire every 24 hours.

You can replace the default caching with your own by implementing the interface

public interface SiteSeeker.Extensions.IExpiration: ISiteSeekerOverridable
        bool Expired(DateTime? lastCached);

And then bootstrapping it as shown below

// programatically
var cache = SiteSeekerServiceOverride.For().ImplementedBy();
BootStrapper.Initialize(new WebSiteSeekerConfiguration(cache));