Thursday, April 18, 2013

Crawling publishing image fields

When you crawl an image field in SharePoint 2010, you will notice that its crawled property does not contain any data. You have several options to work around this issue, but my favourite option is by using a custom META tag. The SharePoint crawler will provide every META tag as a crawled property. These crawl properties can be found below the Categories > Web section in the Managed Properties module of the search service application. These properties are available with the same name of the custom tags, in uppercase.

 
   <meta name=’myImageFieldMetaTag’ content=’<SharePointWebControls:FieldValue  FieldName="myImageField" runat="server" id="myImageFieldId"/>’ id="myImageFieldMetaTagId" />



What about SharePoint 2013?

I haven't tried it yet, but it seems like it's supported in the new version.
All site columns that contain values will automatically become managed properties when they're crawled. A publishing image field is one of them and will be crawled with the following name syntax:

Crawled property name: ows_q_IMGE_SiteColumnName
Managed property name: SiteColumnNameOWSIMGE

I'm not sure yet, if I like the auto generation. Those names are not that userfriendly, but yes... it doesn't matter in this case.

Reference: Automatically created managed properties in SharePoint Server 2013

2 comments:

kamal mehta said...

Nice post ,Thanks for sharing .





Sharepoint Developers

Xavier French said...

The SharePoint spider will offer every META tag as a indexed residence.