Thursday, March 12, 2015

Crawled Properties and Managed Properties in SharePoint

These two terminologies “Crawled Properties” and “Managed Properties” are very important to understand to have better knowledge on SharePoint search. These two concept are core to the SharePoint search.

Crawled Properties

By default when you create a SharePoint column on list or library, it will generate a crawled property which is marked with “Include in Full-Text Index”. The naming of crawled property will be ows_internalColumnName. You do not have any control over the creation of “Crawled Properties”.

The crawled property by itself is useless for you when trying to run or build search queries or even display the value of this property in search results. Crawled properties can be found in two ways – during crawling of the content and during content processing.

Crawled Property found during Crawling Time

When you crawl content from a SharePoint libraries, each column in the library is metadata associated to the corresponding document. Therefore they are exposed as crawled properties. In the below image, each column will be exposed as crawled property including custom column “Department”.







Crawled Property found during Content Processing

The second way the crawled property can be found is during content processing. The best example for this is that the metadata property defined for office documents as given below.
























Each one of the above properties are extracted during content processing time and exposed as crawled properties.

Managed Properties

Managed properties are basically group of one or more crawled properties. When site columns are crawled, SharePoint 2013 automatically creates crawled properties and also creates managed properties and adds a mapping between them. Regular columns do not. Let’s say, user has created a columns like “Customer Name” and “Client”. For the organization these two columns represent the same content / information but not for search. For search, they are just crawled properties and they are different as they do not share the same name. On top of this, since they are just crawled properties, if someone searches for all documents where Client = XYZ. Then they will find nothing at all. Because no search related feature works with crawled properties themselves. To make it work, you need to create a Managed Property and associate the respective crawled properties. Managed Properties appear in search result and user can execute query on this. Crawled properties can’t be used for this.

Mapping between Crawled and Managed Properties

We all know that SharePoint can crawl data from various system/sources. The data present in this various source system have metadata which can have different name but all refers to same information. For example, Author information is stored in different system can be Author, Writer, Created By, Owner etc. But all these fields represent same information that who has created the information/files/documents.

When SharePoint crawls these various systems, these fields are exposed as crawled properties. We can single managed property as “Author” in SharePoint and associate all the crawled properties as given below.



If you look at the managed property, they have a corresponding property called “Searchable”. This means if crawled property is mapped to managed property marked as searchable, those columns are searchable. However, if the managed property is NOT marked as searchable, even though crawled property is marked with “Include in Full-Text index”, it will NOT be searchable. Please refer the below table for clarification.

Crawled Properties
Managed Properties

Included in Full Text-Index
Not Included in Full Text-Index
Searchable
Not Searchable
Column Searchable






X






X


X


If a crawled property is mapped to two managed properties, where one of them are set as searchable, then the value will be searchable.

Happy reading and provide your feedback.



No comments:

Post a Comment