HomeDev GuideRecipesAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In

The topic provides sample code for comparing search results that use `.UsingPersonalization()` versus search results that do not. The examples are based the Optimizely Customized Commerce sample site "Quicksilver", and the APIs that were introduced in [Personalized Search & Navigation](🔗).


Recommendations and personalized search results currently only supports Optimizely Customized Commerce content.  Also, the `.UsingPersonalization()` syntax only boosts Optimizely Customized Commerce content properties.

## Preparation

  1. Install the [Quicksilver](🔗) sample site.

  2. Install the NuGet packages _EPiServer.Personalization.Commerce_ and _EPiServer.Find.Personalization_, see [Personalized Search & Navigation](🔗).

  3. Add the following configuration from the _Optimizely.Personalization.Commerce_ package to the _web.config_ file of the site.

  1. Verify that the data tracking and recommendations work as expected. 


  1. Browse some product pages on the site, so the personalization system can track and collect behavioral data.

## Verify attributes

### Create a PersonalizedFindPage page type

### Create a PersonalizedFindPage page view model

### Create a PersonalizedFindPage controller

### Create a view for displaying the attributes

The view result will look like this:


Make sure the returned attributes are not empty.

## Compare search results

This example visualizes the difference between search results with and without personalization.


Personalized Search & Navigation works only with free-text search queries, as described in [Searching](🔗).

First, add `.UsingPersonalization()` to the search query.

Then, add another search query without` .UsingPersonalization()`, for comparison.

To preview the result on the front-end, add more properties to the model.

The controller.

The view for displaying the attributes.


The search query that uses .UsingPersonalization gives results that are boosted using visitor attributes, and the search results are ordered differently.