Fix one of the problems in SharePoint Search - Make Title sortable
- Kasper Larsen
- Jan 23, 2024
- 1 min read
Updated: Jan 30, 2024
In the PnP Modern Search project, we have handled multiple issues and questions related to the "Title" Managed Property and sorting.
People are often seeing something like this Http Error 500
The reason is that they have defined an option to sort by "Title", which should be allright, right?
When we check the properties for "Title" in the Search Schema (in the SharePoint Admin center), we can see that "Title" is neither sortable nor refinable!!!!!
However, we can also see that the managed property "Title" is mapped to "Basic:#10, Office:#2, and Basic:#9, which we can use to fix this annoying issue.
We basically have to map one of the RefinableString properties to those crawled properties.
NOTE: You should map ALL the crawled properties from Title to the RefinableString.
I know that I am going to need to sort by Title sooner or later, so I set up this mapping on each tenant, usually using RefinableString00 and setting the alias to TitleSortable
Once the mapping has been picked up by the search index (when RefinableString00 starts containing values) I can replace "Title" in the Sort settings, and update the Title row in "Manage columns"
And we are back in business again.














I would just like to add my experience here when trying to do the same thing. Like others, I needed the out of the box 'Title' to be sortable. For my particular scenario, I am using the Modern Search v4 Search Results web part, and choosing the 'Details List' layout, with 'Title' as one of the columns, configured to be sortable. Now, why the managed property 'Title' isn't sortable I'll never know but hey ho, us SharePoint people are used to rolling with the punches! Any way, I digress.
I tried mapping ows_Title to a RefinableString but after several reindexes, and days, maybe weeks, of waiting, nothing ever got pushed into the RefinableString.
So, I looked at the mapping of…
How the new RefineString start to have values? I've added but is null. Is there a way to force to be provisioned?
I would like to add that you can't find "Basic" and "Office" under "All categories", but must change "Filter on category" to "Basic" and then "Office".
When changing the filter category I had to press "find" with a blank value, and then manually find "Basic".
So basically the "search" function inside "search" does not work
I think it's important to limit your use of sorting by Title in search results. It's good if the number of results is small and predictable, but as soon as you're using a search box, the *right* result may be way down the list. But yes, Title simply should have been set up as refinable and sortable from the very beginning of the search schema.
The first managed property I always create is mapping `ows_SiteName` to `RefinableString00`, because *where* something sits is often one of the better pieces of metadata in a search-driven page.