Introduction
In this article we can explore how to convert Managed Metadata Terms into Search Refiners.
Problem
The following is our Term Set.
In this article we can explore how to convert Managed Metadata Terms into Search Refiners.
Problem
The following is our Term Set.
We need to show it as Search Refiners.
The procedure is summarized below.
The procedure is summarized below.
- Create Terms
- Create List
- Create Data
- Full Crawl
- Create Refiners
- Create Search Center
- Modify Results Page
- Test Search
Procedure
Please use the following procedure to do it.
Step 1: Create Terms
Open Site Settings > Term Store Management Tool and create the following Terms.
After the term creation, we need to modify the Intended Use properties too. Select the Term Set and set the following properties to true.
Save the changes. Now you are ready to move to the next step.
Step 2: Create List
Create a new list named Consultant of type Custom List and add the following properties:
- Name (text)
- Qualification (text)
- Skill (Map to Term Set Skill)
Step 3: Create Data
Populate the data into the list.
Step 4: Full Crawl
We need to do a Full Crawl now. Open Central Administration then select "Service Applications" > "Search Service Application" > "Content Sources". Select the content source and choose Start Full Crawl.
Wait for a few minutes for the crawl to be completed.
Step 5: Create Refiners
Now the search system should have identified our new columns, but they are just crawled properties. We need to convert them to Refiners.
Open the Search Schema page from the Search Service Application page.
Open the Search Schema page from the Search Service Application page.
Search for the property named Skill and you should get the following results with owsTaxIdSkill. The prefix ows is added for automatically generated properties. Here the property is generated from our Skill column.
Click on the owstaxIdSkill property and you will get the following page.
Scroll down and mark the following properties to Yes.
Scroll down and mark the following properties to Yes.
- Refinable
- Sortable
We need to map the property to the following ows_Skill as shown below. Scroll down and choose Add a Mapping to find and add the property.
Save the changes. Do a Full Crawl now.
Save the changes. Do a Full Crawl now.
Step 6: Create Search Center.
We need to create a custom search center site now. This is to get an editable search results page.
Go back to the SharePoint site and do the following:
Go back to the SharePoint site and do the following:
- Activate Publishing site collection feature
- Create a new site of template Enterprise Search Center
Open the Search site and enter the text MCA based on your qualification data.
Click on the Search button and you should be seeing the following results page.
Step 7: Modify Results Page
Now we have a results page that can be modified. Choose the Edit Page option. You will get the following view.
Select the Refinement web part and choose Edit Web Part. In the appearing section towards the right-click theChoose Refiners button.
In the appearing dialog find the owstaxIdSkill property that we marked as Refinable. We can only get the property here once it is marked as Refinable.
Add the property to the right panel and change the following properties as shown above:
Now we have a results page that can be modified. Choose the Edit Page option. You will get the following view.
Select the Refinement web part and choose Edit Web Part. In the appearing section towards the right-click theChoose Refiners button.
In the appearing dialog find the owstaxIdSkill property that we marked as Refinable. We can only get the property here once it is marked as Refinable.
Add the property to the right panel and change the following properties as shown above:
- Display name to Skill
- Display template to Multi-value Refinement Item
- Sort by to Name
- Sort direction to Ascending
Click the OK button to save the changes. Click the OK button for the web part. Save the changes to the page too.
Step 7: Test Search
Now we are ready to test the search. Refresh the Search Results Page and you should be seeing the Skill refiner to the left as shown below.
Select a skill and click the Apply link. You can see the results that were refined to the right.
You can see the Terms as Search Refiners now. This concludes our article.
Note:
If you experience any page refresh problem I would advise to do an IISRESET and browser cache clearing for retrying.
Now we are ready to test the search. Refresh the Search Results Page and you should be seeing the Skill refiner to the left as shown below.
Select a skill and click the Apply link. You can see the results that were refined to the right.
You can see the Terms as Search Refiners now. This concludes our article.
Note:
If you experience any page refresh problem I would advise to do an IISRESET and browser cache clearing for retrying.
No comments :
Post a Comment