In this article we can explore another important feature called Search Refiners & Faceted Navigation
What is Search Refiner?
Refiner is a Managed Property based on Search Index. We can use Search Refiners to narrow down search results. Following is an example of Search Refiners.
Through advanced configuration & Scripting, we can modify the Visual Refiners as well.
What is Faceted Navigation?
Faceted means Smooth. Faceted navigation is the process of browsing for content by filtering on refiners that are tied to category pages.
In the practical let us try out using a Search Refiner. We are trying to create a Refiner of type text to filter out different states like California, New York, Florida etc.
Step 1: Create Enterprise Search Center
Create a new site from the Enterprise Search Center template.
The Search site will look like below:
Step 2: Create List & Data
Create a List in your main site with the following fields & name it as Vendors:
1. Title, string
2. ServiceLocation, choice with values [California, New York, Florida]
Enter 3 items with common values for the Title column but different ServiceLocation as shown below:
Step 3: Start Full Crawl
Go to Central Administration > Service Applications > Search Service Applications > Content Sources.
Choose the Local SharePoint Sites content source & Initiate a Full Crawl.
Stop existing Crawls if there are any Continuous or Incremental Crawl running. If you are using Incremental Crawls, things may not work as expected, please do a Full Crawl.
Wait for few minutes for the Crawl to get completed.
Step 4: Test Search
Now go the Enterprise Search Center site and do a Test Search for SSD. You should be seeing multiple results as shown below. This ensures that the Crawling went fine.
Step 5: Create Refiner
Go to Central Administration > Service Applications > Search Service Applications > Search Schema
You will get the following page.
Choose the New Managed Property link. We are going to create a new Managed Property. Enter the values for the properties:
As shown below:
Scroll down & choose the Add Mapping button. Search for the text ServiceLocation and you should get the Crawled Property as shown below. Select the property & choose the Add button.
Click OK button to save changes.
Search Refiners are Managed Properties marked as Refinable.
Step 6: Full Crawl
Open Content Sources and Perform another Full Crawl.
Wait for the Crawl to get completed.
Step 7: Add Refiner to Results page
Open your Enterprise Search Center site and go to the Results page.
Choose the Edit Page option & Edit the Refinement web part & Click on the Choose Refiners button.
In the appearing dialog box select the ServiceLocationManagedProperty and Add to the Refiners list. Enter a Display Name as well.
Click the OK button to close the dialog. Click the OK button for web part as well.
Save changes to the page.
Step 7: Test the Page
Now try searching for the text SSD and you will see the results and refiners.
This confirms that the Refiners are configured correctly.
Please note that the Refiner Strings appears based on the results. If the result does not have New York, then the refiner string won’t appear.
If you are using Site Columns you will get the Managed Property automatically created.
In this article we have explored Search Refiners. I believe this will be useful in real world scenarios. In advanced configurations, you can create your own Visual Refiners as well.