Looking for an easy way of ensuring newly created site columns have a metadata property in the default search service application?
Luckily, there’s a setting for this, although it isn’t that easy to find, unless you know it’s there.
Before showing you how to enable this, it’s important to point out a couple of important requirements for this to work.
- The site column you want a metadata property automatically created for must be used by an item\document and contain data in at least one instance. Failing to do this will mean the SharePoint indexer will not pick up the new column or add it to the crawled property list for the Search application.
- The column must not have a crawled property defined for it, I’ll show you where you can check this next.
In your Central Administration site, navigate to the search service application’s management page.
Within the Queries and Results section of the quick launch, click Metadata Properties and then Crawled Properties from the main toolbar.
From the Crawled Properties page, either search for the column or look for it in the list. If it’s not present, you’re good to go. If it is already defined here it won’t be possible for the system to automatically create the metadata property and mapping for you, so you’ll have to manually add columns where this is the case.
You could try and have the system removed unused crawled properties, which may remove the column from this list. I’ll show you how to do this later.
Click the Metadata Properties link in the quick launch again and this time click the Categories link.
From the list of categories, bring the context menu up for SharePoint and click Edit Category.
To enable automatice metadata property creation for newly indexed site columns, enable the “Automatically generate a new managed property for each crawled property discovered in this category” setting and click OK.
As mentioned above, you can try to remove unused crawled properties. To do this, enable the “Delete all unmapped crawled properties” setting while in the edit category page.
Now initiate an incremental or full crawl. Once complete you should have a new metadata property defined with a mapping to the relevant crawled property. The name that’s generated for automatically created metadata properties will always start with ows and then the display name of the column, with non-alpha characters replaced with their hexadecimal character code equivalent.
For example, a column named My Test Column, would generally have a metadata property generated for it called owsMyx0020Testx0020Column where the space character has been replaced with x0020.