Brief Introduction about Crawled and Managed Property in SharePoint 2013


Sathish Nadarajan
SharePoint MVP
Published On :   23 Jan 2015
Visit Count
Today :  4    Total :   14794
Plan, Migrate, Secure, Report
SharePoint & Office 365 Tool. Simple & Easy to Use. 15-Day Trial!

SharePoint Office 365 Tool
Simple & Powerful Tool for Migration, Security & Reporting. Free Trial


By this time, all the SharePoint developers would have come to a conclusion that the entire SharePoint 2013 revolves around Search Schema. Many of us would have implemented the Custom Search Features, using JavaScript, C#, Custom Content Search WebParts etc.,

In all of these implementations, we may come across the terminology called “Crawled Property” and “Managed Property”.

In this article, let us try understand what exactly these terminologies are and SharePoint internally creates them.

As per Technet, the definition for Crawled Property is as follows.

A crawled property is content and metadata that is extracted from an item, such as a document or a URL, during a crawl.

In simple, a crawled property is nothing but a metadata for a SiteColumn. It may not be handled by the developers, but with the help of a Managed Property, we can extract the metadata from Crawled Property.

We cannot create the Crawled Property on our own. SharePoint will create the Crawled Property. We can create the Managed Property and Map the Managed Property to the Crawled Property.

So that these Managed Properties will be used by the search queries, webparts etc.,

For that, we should know, how exactly the crawled property names are framed, how SharePoint deals with that, so that we can make our own customizations accordingly. Again most of the information were already published in Technet and MSDN, I just wanted to make it handy and crispy.

For the creation of an automatically created crawled property name, the following apply:

a. Spaces are removed from the site column name.

b. For site columns of type Publishing HTML and Multiple line of text, the following prefix is added to the site column  name: ows_r_<four letter code>_

c. For site columns of type Managed Metadata, the following prefix is added to the site column  name: ows_taxId_

d. For all other site column types, the following prefix is added to the site column name: ows_q_<four letter code>_

For the creation of an automatically managed property name, the following apply:

a. Spaces are removed from the site column name

b. For site columns of type Managed Metadata, the following prefix is added to the site column name:owstaxId

c. For all other site column types, the following suffix is added to the site column name: OWS <four letter code>

Naming convention for the default site columns in the Products list

This exception applies to the six site columns that by default are associated with the Products list in the Product Catalog Site Collection, as shown in the table right below:

Title

Title

Title

Item Number

ows_q_TEXT_ProductCatalogItemNumber

ProductCatalogItemNumberOWSTEXT

Group Number

ows_q_TEXT_ProductCatalogGroupNumber

ProductCatalogGroupNumberOWSTEXT

Language Tag

ows_q_CHCS_ProductCatalogLanguageTag

ProductCatalogLanguageTagOWSCHCS

Item Category

ows_taxId_ProductCatalogItemCategory

owstaxIdProductCatalogItemCategory

Rollup Image

ows_r_IMGE_PublishingRollupImage

PublishingImage

In SharePoint Server 2013, only site columns that contain values will automatically become managed properties when they are crawled. Regular columns will not automatically become managed properties when they are crawled.

The four letter code represents the site column type, not the managed property type. All automatically created managed properties are of type Text.

The types of the Managed Property are as follows.

Type

Required

System.Int32

Specifies the data type of the new managed property.

The type must be one of the following data types:

1 = Text

2 = Integer

3 = Decimal

4 = DateTime

5 = YesNo

6 = Binary

7 = Double

Examples of automatically created crawled property names and managed property names for site columns without special characters

Site column type

Site column name

Crawled property name

Managed property name

Data format

Single line of text

Site Column Name

ows_q_TEXT_SiteColumnName

SiteColumnNameOWSTEXT

As is.

Multiple lines of text

Site Column Name

ows_r_MTXT_SiteColumnName

SiteColumnNameOWSMTXT

As is.

Choice

Site Column Name

ows_q_CHCS_SiteColumnName

SiteColumnNameOWSCHCS

The text value of the choice.

Choice (allow multiple selections)

Site Column Name

ows_q_CHCM_SiteColumnName

SiteColumnNameOWSCHCM

Selected values separated by semicolon and hash mark — for example, MultiValue 2;# MultiValue 4;#.

Number

Site Column Name

ows_q_NMBR_SiteColumnName

SiteColumnNameOWSNMBR

Textual representation of the number. The value will use dot as a decimal symbol.

This format cannot be used in a greater than or less than comparison with other integers. It should only be used when querying for and displaying an exact value.

Currency

Site Column Name

ows_q_CURR_SiteColumnName

SiteColumnNameOWSCURR

Textual representation of the number. The value will use dot as a decimal symbol.

This format cannot be used in a greater than or less than comparison with other integers. It should only be used when querying for and displaying an exact value.

Date and Time

Site Column Name

ows_q_DATE_SiteColumnName

SiteColumnNameOWSDATE

Textual representation of the date in the format YYYY-MM-DDTHH:MM:SSZ. For example, December 25, 2012, 7 AM GMT is 2012-12-25T07:00:00Z.

This format cannot be used in a greater than or less than comparison with other dates. It should only be used when querying for and displaying an exact date.

Yes/No

Site Column Name

ows_q_BOOL_SiteColumnName

SiteColumnNameOWSBOOL

For true, use value 1. For false, use value 0.

Person or Group

Site Column Name

ows_q_USER_SiteColumnName

SiteColumnNameOWSUSER

Email | Display | Name | EncodedClaim Claim. For example, "ellenk@contoso.com | Ellen Kessels | 693A30232E777C7265646D6F6E645C70696E676A i:0#.w|contoso\ellenk”

Hyperlink or Picture

Site Column Name

ows_q_URLH_SiteColumnName

SiteColumnNameOWSURHL

URL, description. For example, http://www.contoso.com, Welcome to the home page of Contoso.

Publishing HTML

Site Column Name

ows_r_HTML_SiteColumnName

SiteColumnNameOWSHTML

Html escaped enclosed in a paragraph tag. For example, <p>&lt;div&gt;&lt;b&gt;some html &lt;/b&&lt;/div&gt;</p>.

Publishing Image

Site Column Name

ows_q_IMGE_SiteColumnName

SiteColumnNameOWSIMGE

Html image tag. For example, <img alt="" src="/sites/pub/SiteCollectionImages/home.jpg" style="BORDER&#58;0px solid;" />.

Publishing Link

Site Column Name

ows_q_LINK_SiteColumnName

SiteColumnNameOWSLINK

Html link tag. For example, <a href="http&#58;//www.microsoft.com" target="_blank" title="mytooltip">Microsoft Website</a>.

Managed Metadata

Site Column Name

ows_taxId_SiteColumnName

owstaxIdSiteColumnName

See "Data format for Managed Metadata" below.

Integer*

Site Column Name

ows_q_INTG_SiteColumnName

SiteColumnNameOWSINTG

Textual representation of the integer.

This format cannot be used in a greater than or less than comparison with other integers. It should only be used when querying for and displaying an exact value.

GUID*

Site Column Name

ows_q_GUID_SiteColumnName

SiteColumnNameOWSGUID

Values separated by hyphens, enclosed in brackets. For example, {147C6BA1-709C-4401-964A-27AC36B62C54}.

Grid Choice*

Site Column Name

ows_q_CHCG_SiteColumnName

SiteColumnNameOWSCHCG

For each row, row name separated by semi-colon and hash mark, followed by the selected value.

ContentTypeIDFieldType*

Site Column Name

ows_q_CTID_SiteColumnName

SiteColumnNameOWSCTID

Name:#ContentTypeID;#

SPS average rating

Site Column Name

ows_q_RAVG_SiteColumnName

SiteColumnNameOWSRAVG

Textual representation of the number. The value will use dot as a decimal symbol.

SPS rating count

Site Column Name

ows_q_RCNT_SiteColumnName

SiteColumnNameOWSRCNT

Textual representation of the integer.

Note:

Automatic creation of managed properties is not supported for the following site column types:

· Lookup

· Calculated

· Task outcome

· Summary Links data

· Rich media data for publishing

With this let us see, how to create Managed Properties and Use them on our code in the coming articles. In this article, thought of giving a high level introduction about the Managed Properties. Hence, most of the tables are taken from MSDN and Technet.

Happy Coding.

Sathish Nadarajan.

SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Categories

Migratiin Tools for SharePoint