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.
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…
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?
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:
- Navigate to Tenant Administration
- Select “Search”
- Select “Manage Search Schema”
- Search for a Managed Property that’s either:
- Mapped to the Crawled Property you want to use, or
- Isn’t mapped to anything yet.
- The RefinableXX – named, built-in properties are recommended for most use cases.
- Click the property to edit it
- Scroll down to “Alias” and add your multiple aliases, separated by a semicolon
- Example: “Alias1;Alias2”
- Click Save and you should be good!
You should be taken back to property list and your Managed Property should look something like this:
After following these steps, you should have a functional configuration of 2 aliases for just one Managed Property!
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.
Latest posts by Antti K. Koskela (see all)
- How to instantiate your DbContext outside your Data project? - November 11, 2019
- Another year, another Hacktoberfest (2019)! - November 1, 2019
- How to resolve “refusing to allow an integration to create or update .github/workflows/main.yml” on GitHub Desktop? - October 29, 2019