Let's fix SharePoint Search together!

How to add multiple aliases to a Managed Property in SharePoint Search?

This post was most recently updated on April 29th, 2019.

Reading Time: 3 minutes.

This article explains how to add multiple aliases to one managed property in SharePoint Search Schema Management. Yes, it’s possible, just a bit unintuitive! I’ll explain the process below.

Solution

This seems to be another “gotcha”, that’s missing from the official documentation, but is super helpful to know when you happen to need it!

The way I encountered it was in a dev/staging environment, where certain automatically created Managed Property, owstaxIdValoTags (I’ll leave it up to you to figure out what the name is all about), had decided to disappear completely. That was a bit of a problem, as we had some existing functionality that depended on the property’s existence.

We were faced with either (1) figuring out what had happened and working with Microsoft Support to get it restored, (2) trying to force its recreation by importing search configuration again or (3) configuring the name of the property to work as an alias to an existing Managed Property.

We decided to not bother the support folks, nor take the risk of causing any weirdnesses by importing the configuration, and opted for option 3. Creating an alias is a really quick way to fix the issue, after all.

However, how to achieve this? We were working on a tenant where creating new mappings were known to be quite unstable, so we had to use an existing mapping.

You probably know to navigate to the tenant administration (instead of site collection settings) select “Search” and then manage search schema, but what then?

Well, obviously you can just look at existing mappings for further guidance. Let’s see below, how a mapping of multiple aliases to one property looks like…

Multiple aliases configured for an out-of-the-box Managed Property, "Audiences".
Multiple aliases configured for an out-of-the-box Managed Property, “Audiences”.

Okay that doesn’t look too bad!

However, even though the value of the Aliases is described as “Alias1, Alias2”, guess what happens when you navigate to Managed Property’s edit view and add that value there?

How to NOT add multiple aliases to a Managed Property. I know, I know - this is how SharePoint displays them! But it's not how to configure it.
How to NOT add multiple aliases to a Managed Property. I know, I know – this is how SharePoint displays them! But it’s not how to configure it.

This seems fine, right? A comma and a space as a delimiter, just like it’s shown in the property list – pretty promising, right?

Well, yeah, but it’s not correct. This is the error message you’ll get when trying to save:

The settings could not be saved because of an internal error: The managed property “RefinableString113” can’t have alias set to ValoTags, owstaxIdValoTags: The following invalid characters were used: ‘,’, ‘ ‘.

“The following invalid characters were used: ‘,’, ‘ ‘.”, huh?

So just adding the values like they’re shown doesn’t work. What now?

Well, no worries: the right way to add multiple aliases to a Managed Property is actually by separating them with a ‘ ; ‘, i.e. a semicolon. Armed with this piece of newly acquired knowledge, we’re able to follow the procedure outlined below:

How to add multiple Aliases to a Managed Property in SharePoint?

  1. Navigate to Tenant Administration
  2. Select “Search”
  3. Select “Manage Search Schema”
  4. Search for a Managed Property that’s either:
    1. Mapped to the Crawled Property you want to use, or
    2. Isn’t mapped to anything yet.
      • The RefinableXX – named, built-in properties are recommended for most use cases.
  5. Click the property to edit it
  6. Scroll down to “Alias” and add your multiple aliases, separated by a semicolon
    • Example: “Alias1;Alias2”
  7. Click Save and you should be good!

You should be taken back to property list and your Managed Property should look something like this:

Well, won't you look at that! The aliases look exactly like they should, even for our custom property mapping! Nice one.
Well, won’t you look at that! The aliases look exactly like they should, even for our custom property mapping! Nice one.

After following these steps, you should have a functional configuration of 2 aliases for just one Managed Property!

Antti K. Koskela

Antti Koskela is a proud digital native nomadic millennial full stack developer (is that enough funny buzzwords? That's definitely enough funny buzzwords!), who works as a Solutions Architect for Valo Intranet, the product that will make you fall in love with your intranet. Working with the global partner network, he's responsible for the success of Valo deployments happening all around the world.

He's been a developer from 2004 (starting with PHP and Java), and he's been bending and twisting SharePoint into different shapes since MOSS. Nowadays he's not only working on SharePoint, but also on .NET projects, Azure, Office 365 and a lot of other stuff.

This is his personal professional (e.g. professional, but definitely personal) blog.
mm

Leave a Reply

avatar
5000
  Subscribe  
Notify of