Metadata Property Mappings - Managed Property not populating with data - SharePoint Development & Administration + InfoPath

Sunday, August 15, 2010

Metadata Property Mappings - Managed Property not populating with data

Managed Property not populating with data

I was playing around with search scopes and result page XSL templates in order to develop a search solution that incorporates custom fields from a content type used on multiple site collections.  Content types containing custom columns that were to be searched across, as well as displayed in the search results.

The same content type has been reused multiple times across the primary site collection, and has also been deployed and used multiple time in other site collections.  When configuring managed metadata property mappings for the custom fields, I was able to map each field to a managed property by searching for the field name.

I was then able to create an advanced search page the included the custom properties.  When incorporating the additional managed properties into the search results, I found that only items from the original (primary) site collection would have data associated with the custom mappings.

The content type had been deployed to each site collection by deploying and enabling an InfoPath Form Service solution.  The content type created once enabled was then associated with the form library from each site collection.  I found that the internal column names from the content types on all site collections except for the primary site collection were set in the format of an Id, and not the text representation for column names the original content type.

To allow the managed properties to contain data from a particular column across each site collection, I needed to do one of the two things:

1. Remove and re-create the column on the site collections where the column names were set as Ids. This resulted in the column names reverting to the same text name of the equivalent column on the primary site collection.  The search crawler then maps data from the column on each site collection.  


2. Update the managed properties so that each instance of the column in each site collection is mapped to the Managed Property in Central Administration.  To do this, I needed to obtain the internal column names, which in this case were in the same format as a list or column id in SharePoint.  When finding columns from the SharePoint farm to map to the managed property, searching for part of the column id resulted in the column being found.  After adding each instance of the columns from all site collections using the column ids, I then selected the option to “Include values from a single crawled property based on the order specified”.  This results in the managed property being populated with data from one of the mapped columns only, which will be the first one that contains data in the order specified.

After performing a full crawl of all site collections in the farm, the search results successfully incorporated the custom managed properties.  The advanced search now searched across all site collections to find items using values in the custom fields.
Share this article:
Stumble This Delicious
submit to reddit

No comments:

Post a Comment