Subscribe via RSS Feed Connect with me on LinkedIn

Refining on Content Type in SharePoint 2010

[ 6 ] January 21, 2011 |

It’s always good to see that things that you think are worth blogging about other people find important as well. So I was going to write an article about refining on Content Types in SharePoint 2010 but Glyn Clough wrote such a awesome post that there would be no point!

However there is still of question of why you can’t use the out of the box Content Type managed property, and if you can’t use this what else can’t you use?

Turns out when you have a managed property there is an property called ‘Retrievable’ that allows whether the property can be used in queries. Turns out that the Content Type managed property is set to false, and try as I might you can’t change that (unless someone knows a way?)

So what other properties are set to false? Well some simple powershell magic will tell us:

Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication "Search Service Application" | where {$_.Retrievable -eq $false}

Account
BestBetKeywords
CategoryNavigationUrl
Colleagues
ContentsHidden
ContentSource
ContentType
DocComments
DocKeywords
DocSignature
DocSubject
EndDate
ExcludeFromSummary
ExpirationTime
FollowAllAnchor
HostingPartition
ModifiedBy
NLCodePage
Notes
OWS_URL
PrivateColleagues
Purpose
RankingWeightHigh
RankingWeightLow
RankingWeightName
SiteID
SocialTagTextUrl
SPSiteURL
StartDate
UrlDepth
WikiCategory

So there you go you can’t use any of these. Of course as Glen pointed out you can easily create your own managed property by mapping it to the Managed Property that SharePoint already creates like below:

image

Which seemed to work for him whilst I got a lot of weirdness, namely that the refiners would show up but didn’t work. So my approach (and to be honest it could be me not reading Glenn’s article properly) was to actually map my custom Content Type Managed Property to the two crawled properties that SharePoint uses – Basic:5(text) and ows_ContentType(Text)

image

This did work nicely for me and once again shows how powerful this web part really is! There is also some other really cool refiners you can create which I will cover next article.

More Links

Need more information about the refinement panel, try these links:

Tags: ,

Category: How To

About Michal Pisarek: Michal Pisarek is the founder of Dynamic Owl Consulting and a Microsoft SharePoint MVP. View author profile.

Comments (6)

Trackback URL | Comments RSS Feed

  1. [...] This post was mentioned on Twitter by Glyn Clough and Michal Pisarek, Michal Pisarek. Michal Pisarek said: Refining on Content Types in SharePoint 2010 http://bit.ly/gVQ0lX #sp2010 [...]

  2. [...] a quick search I found this article, Refining on Content Type in SharePoint 2010, however I know a means of allowing the built-in Content Type managed property to be used as a [...]

  3. GavinB says:

    Hi Michael

    Great post, you can enable the OOTB ‘Content Type’ managed property as a refiner, it just requires a little PowerShell, however doing it the way that Glyn mentioned worked best for me.

    The power shell commands are up in a blog post over on my blog with links back here: http://gavinb.net/2011/03/21/fast-custom-refiner-on-content-type/

    -Gavin

  4. Hey Gavin.

    Thanks for the comment. I also tried your way but you are right in that it seems to come back with the MIME type which is kinda useless..

  5. Chris Quick says:

    Michael,

    Would this explain why performing a keyword search such as ContentType:Idea would return not only the Idea content type, but also Idea Comment and others that start with “Idea”?

    I find it odd, because I’ve used this in a virtual environment without any issues. However, I went into a production environment for a client and started experiencing the above noted behavior.

    Thanks,
    Chris

  6. […] Refining on Content Type in SharePoint 2010 by Michel Pisarek (@MichalPisarek) […]

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.