top of page
Writer's pictureJonathan Stuckey

SharePoint - modern search filters using metadata facets

Author: Jonathan Stuckey


SharePoint Online modern search experience has been poor cousin of SharePoint service for years. There have been changes in recent days to provide some measure of usefulness in delivering a credible Search experience in modern - although there are still some big, ugly holes in the tooling.

In June/July this year Microsoft brought back a basic set of configuration for "Verticals" (a Scope by any other name). These basic configuration verticals are well covered online in Microsoft's articles, but as usual they are missing key details and pre-requisites when attempting to setup useful search experiences for users.

screenshot of search results page using Vertical presentation
Results from a target Search Vertical in SharePoint Modern search

In this article I'll do a quick cover the basic options in the Verticals configuration to show how we can target search-experiences for effective content discovery.


Preparation is key

Doesn't matter how you setup the Search experience, what you colour in or how much/little content you have, if you haven't looked at the following from a hygiene and management perspective there is no point to adding Verticals.


Information usability depends on planning, management and behaviours (or to put it another way "Hygiene"). The following are key elements of making information accessible and useable - whether via Search or through navigation and filtering:

  • Quality of your content

  • Currency of content

  • Information architecture:

    • Naming conventions

    • Metadata (labelling)

    • Content types (information types - not SP technical structure)

Only once you've started applying appropriate management measures, is the Presentation of display for results worth improving. Otherwise, How Do You Know what you are presenting has any value to the users?


Where everyone falls over is assuming you have to do this to Everything, Everywhere all at Once - not so. There are some great strategies for segmenting, cleaning and curating content to provide improved access and usability of your information - but this article isn't about that.

KQL is still a thing

The irony of abstracting users (end-users and specialists alike) away from underlying languages with search tools in favour of ML (Machine Learning) and AI (Artificial Intelligence) is not lost on those of us who have to help develop, build and train such solutions to work.


Unfortunately, "Magic" does not "just happen", you need to train and guide the ML and AI experiences and we still need to present it in a consumable (trustworthy) manner for users.


Use of Keyword Query Language (KQL) is still very much a necessity when putting together experiences for users. If you've been around SharePoint (or even FAST Search) then KQL is your friend (and relatively easy to learn). Microsoft has a vast set of articles providing a huge range of technical information e.g. Building search queries in SharePoint | Microsoft Learn - and very little guided-context for applying it.


The Keyword Query Language (KQL) syntax reference | Microsoft Learn does at least give you some nice (simple) examples which can be tested in the search box on your tenancy. For example, the image below shows using Keywords "author" and "filetype", with query operator (AND) to provide the focus for our search:

SharePoint search results using KQL Query in search-box
Using KQL query in SharePoint Modern Search UI

Creating the Search Vertical for targeted result-sets

Setting up a Vertical, if you've ever created a "Search Scope" in SharePoint Classic is essentially the same thing - but without the useful KQL builder tool to help you.

Basics are actually really simple. You have:

  • create or modify a global vertical (and will appear on global search experience tabs:


  • OR create or modify a local search vertical on the actual site or Hub to focus the users experience

But we have two different UIs to navigate to set this up, and there is not single place to confirm or see all local Verticals created across your tenancy.


Configure a global search result vertical

To setup a global vertical result page, you will need access to the Microsoft Administration Centre and the delegated role for Search Administrator

  • Settings > Search & Intelligence

  • Select Customizations tab

  • Click "Verticals"

Search configuration interface in Admin Centre

To add a new one, it's a Wizard driven experience, which is pretty straight forward:

Create new Search Vertical wizard

Key to remember as you go through are:

  • For Content source make sure to select SharePoint

Vertical wizard: Content Source selection
  • In Query use of basic KQL keyword and attributes can be applied (like specifying the "Path:" to content to search:

Vertical wizard: Query example
  • Filters is where we get to select our Indexed metadata, and use Crawled (Queryable) search properties for applying Search filters to results:

Vertical wizard: Select Filters to use based on metadata

It is at this point where knowledge and exposure to the Classic use of Crawled properties, Search Schema configuration and knowing what & how to reference the Mapped properties is required (see related articles at the bottom).


Configure a local search result vertical on a specific site

A localised search results page (Vertical) is setup on the specific site you wish to deploy too. While the actual configuration UI is the almost the same as for a Global Vertical. As specific site "Site Collection Administrator" role (or Owner group member on Microsoft Group attached site) you:

  • navigate to your site (e.g. /sites/resources)

  • Select Settings cog and click Site Information

  • At the bottom select "View all site settings"

Once you can see Site Settings page:

SharePoint Site Settings - modern Microsoft Search access
  • Select "Configure search settings" under Microsoft Search.

CAUTION: It is important to select the correct link. Depending what has been configured on your site, you may also see the Classic Search configuration options under "Search" heading (1) and possibly "Site Collection Administration" heading (2) as well (illustrated):

Classic search configuration access links

WARNING: these will not provide configuration on the SharePoint Modern UI pages.


While similar, the configuration access and UI is drastically cut-down from Global Microsoft Search configuration UI:

...only providing single Search > Customer experience > Verticals path in order to configure your site's Vertical results page(s).


Creating a Search Result Vertical here is then exactly the same process as for Global Verticals, but you can be specific to site you are on.


Result display and presentation

One of the biggest gaps with modern search experience is the ability to shape the result data presentation. With SharePoint classic we could make use of standard HTML and XML for creating display-templates, which would let us present, target or emphasize curated information in more useful ways. Colourising specific sources, or categories of results, and surfacing key information Microsoft has conveniently excluded from the default results (such as location, or specific metadata).


Modern has not had this facility since the introduction of new search experience 6 years ago. This last 18-months Microsoft as (re)introduced the ability to provide "display templates" using Adaptive Cards - but without the supporting tools to make this easy.


Finally! Microsoft has re-introduced (in Preview) the tools for creating result cards -

The new designer webservice is available on: MRT Designer (searchlayoutdesigner.azurewebsites.net)

Now the default gallery examples are frankly rubbish, but they do allow for some variation from basic results. For example:


Remember

Search driven experiences are only as good as your content. If your content is poor, out-of-date, or not readily labelled or identifiable your search wont magically fix everything.

Nothing beats some elbow-grease keeping content clean to make your search work really well.

Secondly, surprisingly in this day-and-age many people still don't know how to drive search to get good results (or how to validate if results are useful). Teaching your users, the basics of search will really improve perception and use of your service.


For details on anything here take a look at my other articles on here or https://www.timewespoke.com or give me a shout


Related articles


About the author: Jonathan Stuckey

5 views0 comments

Comments


bottom of page