Tuesday, September 8, 2009

Unable to delete unmapped crawled properties in SharePoint Search

 

Technorati Tags:

One of the most convenient features of SharePoint Search is its ability to automatically discover crawled properties and create new managed properties. This is good because as a SharePoint administrator I don't want to have to take requests from users to set up new managed properties to search on. So basically whenever an incremental crawl occurs and the crawler discovers a new SharePoint column it will create a new crawled property and automatically create a new managed property to search against. The only unfortunate problem is that the crawler creates the new managed property with a name predicated with "ows". This is not very friendly but it is standard way for users to use the property in a keyword search, for example owsDocumentName:salaries.

This automatic managed property creation can be set in Shared Services Administration:SharedServices> Search Settings > Crawled Property Categories > Edit Category.

 

 

The "Automatically generate a new managed property for each crawled property discovered in this category" option is not checked by default. So many times clients set up their metadata and upload documents without turning this on. Many clients do want to go back and have to set up all the managed properties. So one option is to check the "Delete all unmapped crawled properties" option and click OK. This is supposed to delete all the crawled properties that are not mapped to any managed properties. After this you can do another full crawl and the crawler will rediscover the crawled properties that were deleted and generate new managed properties. Very nice. Unfortunately, this does not work for all unmapped crawled properties. I noticed there were a lot of unmapped crawled properties that were not being deleted. For instance, ows_baseName(Text). According to Microsoft only unmapped crawled properties will be deleted. You can verify this by examining the dbo.proc_MSS_DeleteCrawledPropertiesUnmappedForCategory stored procedure located in the SharedServices database.

So what is the deal here. Examining the managed properties stored in the SharedServices database in the MSSManagedProperties table, I can see a lot of managed properties that have very long PID values such as 214741802 that have their Hidden column set to true. The ows_baseName crawled property is mapped to one of these hidden managed properties called "TempTitle" and thus it could not be deleted. The SharePoint UI will not show these hidden managed properties. Why? All I know is that when I want to delete all unmapped crawled properties it should do so. The UI should show these. Apparently, Microsoft does not want users changing the mappings.

Below is a list of these hidden managed properties. Some of them look interesting. For instance, CrawlUrl or SiteContainer. I tried using some of these in a fulltextSql query but the search engine threw a "Property does not exist error". Really?

 

2147418028 AnchorLink

2147418033 BaseHref

2147418035 ChangeID

2147418036 CrawlObjectID

2147418090 CrawlUrl

2147418034 CRC

2147450879 DefaultProperties

2147418016 DirLink

2147418021 DirLinkSecurityUpdate

2147418020 DirLinkWithTime

2147418026 EndAnchor

2147418022 FollowAll

2147418023 FollowNone

2147418037 IndexRare

2147418039 LinkHRef

2147418040 LinkOfficeChild

2147418041 LinkOfficeChildList

2147418024 NormalizedForwardURL

2147418025 NormalizedURL

2147418042 PluggableSecurityBlob

2147418089 PluggableSecurityTrimmerId

2147418019 RedirectedURL

2147418018 Robots

2147418080 Scope

2147418027 SecurityBlob

2147418031 SecurityProvider

2147418038 SiteContainer

2147418091 Summary Description

2147418032 TempTitle

2147418029 URLAnchor

No comments:

Post a Comment