This is a blog post in the series “How to set up a product-centric website in SharePoint Server 2013.” In this series, I’ll use data from a fictitious company called “Contoso” to show you how to use search features to set up a website based on product catalog data.
Note: Most of the features described in this series are not available in SharePoint 2013 Online.
For an overview of the blog posts in this series, go to How to set up a product-centric website in SharePoint Server 2013.
In the previous blog posts, we identified the refiners we wanted to use for faceted navigation. We also identified which refiner-enabled managed properties we wanted to use to display these refiners. In this blog post, we’ll learn:
- How to map a crawled property to a refiner-enabled managed property
- How to initiate a reindexing of the catalog
- How to verify that the term set can be used for faceted navigation
- How to add refiners to all terms in a term set
- How to add refiners to specific terms in a term set
Before you begin, if you need a quick refresh on crawled properties, managed properties and automatically created managed properties, see the blog article From site column to managed property – What’s up with that?
Also, in case the length of this post is freaking you out, not to worry. I have used many screenshots, so lots of pictures, and not much text in this post.
Start stage 14
From our planning , we know that we want to use the following refiner-enabled managed properties for the “Audio” and “Cameras” categories:
|Refiner to use||Managed property name|
The procedure to map a crawled property to a refiner-enabled managed property is the same for all the refiners we want to use. In the procedure below, I’ll show you how to do this for the Price refiner. More specifically, I’ll show you how to map the crawled property that represents Price to the RefinableInt01 managed property.
IMPORTANT: Although refiners are displayed on the publishing site, you have to configure them on the authoring site.
Juggling between the different site collections can be a bit confusing. The fact that the UIs look almost identical on both the publishing site and the authoring site doesn’t help. So, if you make a mistake the first time you do this, you’re in good company! I made a mistake or two before I learned…
Here we go!
- On your authoring site, on the Site Settings page, click Search Schema.
- In the Managed property field, type the name of the refiner-enabled managed property to which you want to map a crawled property, and then click the arrow button. In our scenario, we’ll type RefinableInt01.
- From the Property Name menu, click Edit/Map Property.
- On the Edit Managed Property page, click Add a Mapping.
- In the Crawled property selection dialog box, use the Search for a crawled property name field to search for the crawled property that you want to map to this managed property.
In our Contoso catalog, the site column that contains the price information is called “RetBasePrice”, so enter this in the Search for a crawled property name , and then click Find.
Two crawled properties are found: ows_q_NMBR_RetBasePrice and ows_RetBasePrice.
If your facial expression is now showing something close to a big question mark, trust me, I understand your confusion. This part is quite tricky. Not only are two crawled properties found (very strange since we only had one “RetBasePrice” site column), but which one should we choose to map to the refinable managed property?
OK, let’s take a deep breath and take a closer look at what’s going on. In an earlier blog post I talked about the naming convention for automatically created crawled properties. All automatically created crawled properties will have the name ows_<something>_SiteColumnName. For the site column RetBasePrice in this procedure, the <something> is “q_NMBR”. Based on this information, ows_q_NMBR_RetBasePrice can be identified as an automatically created managed property.
I’ll call the other crawled property, ows_RetBasePrice, a regular crawled property.
Now here’s the important part: When mapping a crawled property to a refinable managed property, you should select the regular crawled property!
- Select the regular crawled property, and click OK. In our scenario, we’ll select ows_RetBasePrice.
- In the Alias field, type a name for the refiner. In our scenario, we’ll type Price.
It’s important to understand that the alias that you enter here is not the refiner name that will be shown on our publishing site. This alias is meant to make our lives a bit easier when we’re configuring refiners for faceted navigation (I’ll show you how to do this in the procedures below). Remember, we can’t change the name of the refinable managed property, so when doing the configuration, we’ll have to deal with quite a few refinable managed properties that have similar names; RefinableString01, RefinableString02 etc. So the alias is a good reminder of what we mapped to the property.
- To finish the mapping, click OK.
As I stated at the beginning of this procedure, we have to do the mapping for all the refiners that we want to use. So, for the “Audio” and “Cameras” categories I have mapped crawled properties to the RefinableStringXX refinable managed properties, as shown below.
Now that we’ve mapped all the refiner-enabled managed properties that we want to use, we have to initiate a reindexing of the catalog. I showed you how to do this in Stage 4.
Note to Search service application administrators with access to Central Administration: you can do the same thing by starting a full crawl.
After the catalog has been reindexed, we can finally start to do some configuration. But before we start with the actual configuration, let’s just verify that we can actually use the term set on the authoring site for faceted navigation.
- On your authoring site, go to Site settings –> Term store management.
- Click to mark the term set, in our scenario this is Product Hierarchy, and then click the tab Intended Use.
- Verify that the check box Use this Term Set for Faceted Navigation is selected.
Because we used the Product Catalog template when we created our authoring site collection, our Product Hierarchy term set is enabled for faceted navigation by default.
If you used a different template when you created your authoring site collection, you will first have to enable the term set for faceted navigation. For information on how to do this, see Enable a term set for faceted navigation.
Now that we have verified that our term set can be used for faceted navigation, let’s get on with the configuration.
From our planning, remember that we want to add some refiners to all categories, and other refiners to only a subset of categories. Let’s start by adding the refiners that we want to use for all categories: Brand, Color and Price.
- Click on your term set name. In our Contoso scenario this is Electronics. Then click the tab FACETED NAVIGATION and Customize refiners. This opens a dialog box.
- In the dialog box, in the Available refiners section, scroll down and select RefinableString01. This is the managed property we want to use for the Brand refiner. Notice that sample values are shown (a good sign that we’re on the right path), along with the alias we gave this property when we mapped it to a crawled property.
- To add this refiner to the term set, click Add.
This moves the RefinableString01 property over to the Selected refiners section. When a refiner is moved over to the Selected refiners section, additional configuration options are shown (I’ll get to them in step 7 and 8).
- Repeat steps 1 – 3 from above to add RefinableString02 (the Color refiner) and RefinableInt01 (the Price refiner).
- To preview our refiners, click Preview Refiners.
So this is starting to look pretty good, however we want to have the Price refiner displayed first, and we would also like to change the intervals for the price values. For the Color refiner, we want to allow visitors to select multiple refiner values.
- To move the Price refiner up, select RefinableInt01 (notice the Alias name), and click Move up. Move RefinableInt01 up in the list until it’s the first property in the Selected refiners section.
- To change the price interval for the Price refiner, select RefinableInt01. From the Display template menu, select Slider with bar graph. For Intervals, select Custom, and enter the price intervals we want to display. Separate each value with a semi-colon.
- To enable visitors to select more than one refiner value for the Color refiner, select RefinableString02. From the Display template menu, select Multi-value Refinement Item.
- Click Preview refiners again. Notice that our Price refiner now shows our custom intervals, and is displayed with nice looking slider bars. Also our Color refiner now has checkboxes that enable you to select multiple refiner values.
- To save the changes, click OK in the dialog box AND Save in the Term Store Management Tool.
Now that we have added the refiners that should be applied to all categories, the next step is to add the refiners that could be applied only to a subset of categories.
From our planning, remember that we want to add the refiners Zoom and Screen size to the Cameras category. We also want to add the refiners Mega pixels to the Digital cameras category, and Max ISO to the Digital SLR cameras category.
When adding refiners to a specific term in a term set, the procedure is identical for all terms. So, to save space, I will only show you how to add the refiners Zoom and Screen size to the Cameras term.
- Click to select the term to which you want to add category specific refiners. In our scenario, this is Cameras. Click the FACETED NAVIGATION tab, Stop inheriting, and OK to verify.
- Click Customize refiners. This opens a dialog box.
- To add and customize term-specific refiners, repeat the steps from the previous procedure.
In our scenario, we will add the properties RefinableString03 and RefinableString04. To verify that our refiners are added correctly, click Preview refiners.
- To save the changes, repeat step 10 from the previous procedure
Adding and configuring all the refiners we identified during our planning phase can take some time. The good news is that once we have finished this, it won’t take much work to get the refiners to display on our website.
Next blog post in this series
Stage 15: Add refiners for faceted navigation to a publishing site