SharePoint Online Search Results - Sort By Tile

Overview

Search is more commonly used to display the results on a SharePoint Portal based on the business needs, by configuring the search query. To make more sense out of the search results, they are commonly sorted according to the key attributes like Modified Date, Created Date, Title, etc.

This article covers how we can sort the search results in SharePoint Online. Although it sounds straightforward, it is not as easy as configuring in SharePoint OnPremise environment.

The Problem Statement

Managed Properties play an important role in SharePoint Search. By looking at the title, i.e., Managed Property in SharePoint Online Search Administration, you will observe it is different from the SharePoint OnPremise equivalent and it is not editable!

To access the Managed Properties, follow the below-mentioned steps.

  1. Open SharePoint Online Admin Center (e.g. https://<tenant>-admin.sharepoint.com).
  2. Click “search” from the left navigation.
  3. Click “Manage Search Schema”.

    SharePoint
  1. All the managed properties will be displayed here.
  2. Search for managed property “title”.

    SharePoint

The very noticeable thing here is that the "Title" managed property is not sorted. The managed property has to be sortable to enable the sorting of the result set based on the property before the result set is returned.

If you try to edit the Title managed property, you will observe that Sortable dropdown option is disabled. You cannot change it.

SharePoint

So, if you want to sort your search results based on Title, there is no way you can utilize this managed property.

Creation of New Managed Property

Another obvious option that comes to mind is to create our own new managed property and start using it.

Click “New Managed Property” to create a new one.

SharePoint

SharePoint offers you a page to create your own managed property. But, the problem remains the same. Scroll down the page to see the Sortable option. It is disabled!
SharePoint

This means we cannot have a new managed property created to sort our search result based on Title. Very disappointing!!

Refinable Properties

Another option that could come in handy now is to try out the Refinable managed property. They do not have the sort option disabled. By design, the refinable properties are meant to be used in the refinement panel (usually placed at the left-hand side of the search results to further refine them). However, there is no reason why they cannot fit our purpose and cannot be used in search web parts.

Search Refinable in the search box to see all out of box available Refinable Managed Properties.

SharePoint

For each of the data type (Date, Decimal, Double, String, Int, etc.), SharePoint offers a different set of properties. To make Title sortable, pick up any of the non-mapped RefinableString property and map it to the Title related crawled properties, e.g. ows_Title.

Once the Refinable Managed Property is ready, allow 6 – 8 hours for SharePoint to make it work in your search results.

Troubleshoot

In some scenarios, it is observed that despite of waiting for longer duration, the managed property had not come alive. Below are a few options to try out in that case.

Reindex List

Reindexing the list, sometimes, works to get the data crawled and appear in search results.

  1. Open the list or library to reindex.
  2. From the ribbon, choose "List / Library Settings".
  3. Under General Settings, choose "Advanced Settings".
  4. Scroll down to button “Reindex Document Library” or “Reindex List”.

Reindex Site

  1. In SharePoint site, click "Site Settings".
  2. Under Search, click "Search and offline availability".
  3. In the Reindex site section, click "Reindex site".

Add Dummy Data

Sometimes, if the list has no changes, crawler seems to skip the list (it is not documented anywhere, but just out of a few observations. I might be wrong here).

  1. Add a new list item.
  2. Reindex the list.

Hope this helps to get your search results sorted by Title.