Office 365 – Making the title field sortable in Content Search and Search Results web parts

I’m not going to introduce the Search web parts in SharePoint in this article. I’m sure there are plenty of articles about that.

Today I’m looking at the managed properties in Office 365 as this is something that is different form the on-premises equivalent.

Out of the box the managed property for Title doesn’t have sortable set :

Title

This is probably not too much of a problem if you could simply edit the property and set sortable to yes

sortable

Unfortunately the sortable option is something that you can’t modify.

So where does that leave me, if I need to sort by title.

Create a new managed property? No for new properties this is also disabled!

Did Microsoft remove the sortable option in Office 365? No, they just hid it a bit.

There are many managed properties that start with Refinable… that do have the sort option enabled. These refinable properties are meant to be used by refinement panels. But there is no reason why they can’t be used in search web parts.

Refinable

For each data type (String, Date, Int, …) there is a different set of properties.

RefinableString00, RefinableString01, … all the way up to 20. “WHAT ONLY 20???”, I hear you shout.thXNP4Y9YD

Within Office 365 there are 20 Refinable Properties created for each datatype. Whenever you run out SharePoint will as by magic create another 100. And when you run out again another 100 are created.

So back to the original question of how to make Title sortable. Pick an unmapped Refinable property and map it to the Title fields. Then use that Refinable property in your search web parts and you can sort by Title.

5 thoughts on “Office 365 – Making the title field sortable in Content Search and Search Results web parts

  1. commented on July 5, 2016 by Christopher Bird

    Wondered how to do this.

  2. commented on September 21, 2016 by Hana

    Hi,

    thank you for your post, I followed it but it doesn’t look like my new managed property is returning any values… I waiting 48 hours already and still nothing 🙁 any advice?

    thank you!

    • Which crawled property did you map your managed property?

      • commented on September 21, 2016 by Hana

        TermTitle and ows_Title

      • That sounds ok. Are your items being returned and the titles not displayed? Or are the items not being returned. Are you using custom display templates in your search result/content search web parts?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: