Segmented result list


Söksidan, EPiServer, SiteVision, Sökning

The visitor's first query is often of a general nature. Segmentation of the result list can be of use for websites where the user can be assumed to search for results of a specific type, since the search result is instantly displayed in a structured way and divided into different segments.

Implementing a segmented search page

When you segment the results page, two or more parallel searches are made against different parts of the index for each user search query. The results for these search queries are presented alongside each other as different results lists on a single search page.


From a performance point of view as well as from a user experience perspective, we recommend using a maximum of two to three segments.

SiteSeeker search integration for EPiServer, version 4

Start by creating two seperate SearchRequest instances in the code, for example:

First request:

SearchIndex searchIndex = SearchIndexFactory.GetSearchIndex("exampleSearchIndex");

var mainRequest = new SearchRequest();
mainRequest.Name = "main";
// Example facet value from the search context
var facetValue = searchIndex.SearchContext.Facets.ToList().First().Values.Last();
mainRequest.FacetValues = new List<FacetValue>() { facetValue };<br>

Second request:

var peopleRequest = new SearchRequest();
peopleRequest.Name = "people";

Then update both requests so that they include parameters from the url, such as the user query and language:

var parser = new UrlParameterParser(searchIndex.SearchContext);

Perform the single search for two different requests:

SearchResponse response = searchIndex.Search("TheSearchPageName",parser.UserQuery,mainRequest,peopleRequest);

On the aspx page, you can then access the results and display them as follows:

      var res1 = Model.Results["main"];
      var res2 = Model.Results["people"];
<%=helpers.Result(res1, "ess-normalResult")%>
<%=helpers.Result(res2, "ess-extraResult")%>

EPiServer – search integration version 3

Segmenting the results page in SiteSeeker for EPiServer can be done by adding additional connectors with optional query extensions, together with additional user controls for each segment.

Start by creating one connector for each segment on the results page. This is done in the method OnInit() i Find.aspx.cs. For each connector, the query extension and interface key is defined, (read for more information about interface keys and issues to consider to keep the search statistics useful).

Finally, update the search page Find.aspx with the corresponding user controls.

SiteSeeker for SiteVision

A segmented results page in SiteVision is created by adding several instances of SiteSeeker on a single search page. The different search instances will listen to the same URL and as a result, the same search query will be sent in both (or all) segments, with or without query extensions.

1. Add the first SiteSeeker instance under Interactive - SiteSeeker Search Page
2. The window Edit search page is opened. Verify that the popup-blocker is deactivated if the window doesn't open.
3. Set the URL to the web service for the current index, username and password (if needed) and query extensions to limit the segment to a certain portion of the index.
4. Add the other SiteSeeker instance in the same way, but set another query extension.
5. Click on Templates in the window Edit the search page in order to, with the help of the Velocity templates, modify the design of the new result list. You probably would want to remove the search box from one of the segments, for instance.

You now have a segmented result list!

The SiteSeeker template search page

There is currently no support for segmented result lists in the template search page. Feel free to contact us for advice on how to achieve a segmented search page using an integration module.