Any developer working with the SearchStax Site Search solution for Sitecore can personalize the search experience for different search audiences by using Site Search "Search Profiles."
- "Personalization" is Sitecore's method for displaying targeted, relevant content to your contacts based on their characteristics and behavior, such as location, gender, or previous visits. See Personalization at the Sitecore website.
- Search Profiles are the Site Search method of crafting different search experiences from the same data. Within Sitecore, they're known as "Search Models."
By combining these tools, you can make sure the right content reaches the right contacts. For example, you can show, hide, or adjust content to suit the viewer.
Creating Search Models
If you want to offer different search experiences, start by going to the Site Search platform and creating multiple Search Profiles. Each profile has its own search fields, facets, stop words, expansions, sorting options, and more. Site Search lets you test the search experience provided by each profile. A profile has a unique name that you can reference from Sitecore.
Configuring Sitecore to Use Search Models
Now that you've got the Site Search profiles in place, it's time to configure your search page to use them. Create a few Sitecore profiles and pattern cards:
Then open your search page item and find the "Search Model Definition" field:
You need to set the SearchStax search profile to be used on each pattern or when a profile card reaches a given value. The order is very important here. Make sure you reproduce your precedence. Here are three examples using both strategies (card value and patterns):
The result looks like this:
You can use "Sitecore Explorer" view to test it. Open your search page on "Experience Editor" and find the "Explore" button at the top menu:
Click on it and open the left panel "Onsite Behavior" on the "Profiles" tab:
You can use this panel to give profile card points to the current visitor. This forces the search page to use a different model following the previously established rules. First, run a query in your search page and open your browser's developer tool to check the network tab. Find the query request and click on it. You'll see that the "model" parameter is "Default," which is the one defined for "Search Novice."
Go back to the "Sitecore Explore" view and set some profile card points. Make sure you follow the rules on your search page and don't forget about precedence.
Check the network tab again after running a query.
As expected, the search page uses a different search model called "Expert." This matches what you defined in the rules.
After configuring Sitecore to handle multiple search models, you can personalize the search experience for each search audience. This makes sure your website offers the best search relevance possible.