Overview
By default People Search Results web part sorting capabilities are limited by the following options:
- Relevance (default)
- Social Distance
- Name
Below is presented XSLT based approach how to provide additional sorting options for People Search Results web part.
But before we proceed let me clarify the main limitation of this solution:
- the specified method allows to sort search results returned for page only (to control results returned for page ResultsPerPage property is used)
- applying sorting take place during XSLT transformation (in our case it is applied to relevant results)
Solution description
Provide custom sorting options values
ParameterBindings property is used for storing custom sort options values and passing them to XSLT:
,where
CustomNameSortLabels and CustomNameSortValues are used for storing custom sort option labels and values respectively.
Customize Sort Options in People Search Results
In order to display custom sort options the following XSLT template is used:
Complete XSLT file for People Search Results could be found here
Below is shown sorting options control after applying specified XSLT and providing Parameter Binding property value from above example
Sorting for search results is defined using XSLT sorting element:
Complete XSLT file for People Search Results with custom Sort Options could be found here
Results
People Search Result page with results sorted by Last Name is shown below


Thank you Vadim. I got this working by including the XSLT code and Parameters in both the web parts (Search Action Links and Core Results for People)… As you have specified in your blog post, only the current page items are getting sorted. One issue is, once sorted in custom property, it is appending a query string to the URL and is not getting cleared. Hence the OOB sorting (Default, Name, Social Distance) are not working.. I can write some script to clear it though…
Hi Srikanth,
regrading sorted results per page only, unfortunately using only XSLT based approach it seems that this is the only way.
Thank you for pointing on issue with not clearing custom property, may be you will provide me with the fixes
P.S. In next post will be discussed another way about sorting search results.
This is fantastic!