Wednesday, August 9, 2017

Sort Refiner Values Alphabatically Sharepoint Search 2013

If you are using Managed Metadata Terms as a search refiners then you have noticed that your Refiners values are not coming on alphabetically sorted.

Let's take an example for the same

If you have created a Site Column eg. Term1 Type Managed Metadata Column

Associate this column "Term1" with a List
Add some items to the list and tag the Term1 to some Managed Metadata Terms

Run the Full Crawl from Search Service application

Go to Search Schema in Search Service application and search for Crawled Property





in the Search Box type Term1. After search you will get 2 Crawled Properties

  • ows_taxId_Term1
  • ows_Term1


  • ows_taxId_Term1 contins the TermID along with the TermSet display name. If you add this in your refiner and apply sorting on Name it will sort ASC or DESC based on the TermID

  • ows_Term1 contains the TermSet Display Name. If you cannot add this directly in your refiners because it's not a Managed Property. You need to create a managed property for this and Map this crawled property with your managed property.


Steps to Create a Managed Property

Click on "New Managed Property" in Search Schema Page
Name : Provide Some Name eg. MyTerm
Type : Text
Searchable : True
Queryable : True
Retrievable : True
Allow multiple values : True
Refinable : Yes Active
Sortable : Yes Active

In Add Mapping Screen Search for ows_Term1 and add it
Click on OK


Run the Full Crawl

Add your managed property as Refiner  and set the properties as below on the picture


Display Name : Term 1
Sort by : Name
Sort Direction : Ascending

you will get refiner values are appearing in a sorted order.


No comments:

Post a Comment