In SharePoint Central Administration click on the link below “Shared Services Administration”. Go to “Search Settings”, “Metadata property mappings”, “Crawled Properties”,”SharePoint”,”Edit Category”.Under the “Bulk Crawled Property Settings” section make sure the “Automatically discover new properties when crawl takes place” is checked along with the “Map all string properties in this category to the Content managed property” and the “Automatically generate a new managed property for each crawled property discovered in this category” options. Making sure these options are on ensures that managed properties are automatically created when new SharePoint columns are created. Your solution can use these new managed properties to present to the user. Unfortunately, the name of the managed property is not that user friendly. SharePoint crawled properties are prefixed with an “ows_” and the auto generated managed property is prefixed with “ows”. For example, if a user creates a new column in a document library called “CustomerName” then the crawled property will be “ows_CustomerName” and the managed property will be “owsCustomerName”. If you don’t want to display this to your users then you will have to write some code to parse out the real column name and make sure you map it back to the managed property name when constructing your query. Additional parsing may be needed if the column name has spaces in it. For instance if a user creates a column named “Customer Name” then the crawled property will be “ows_Customer_x0020_Name” and the managed property will be “owsCustomerx0020Name”.

Advertisements