In a previous post I described adding the FileExtension column to the XML you get back from a SharePoint search, so that you can use it in your results page. This raises the question – what columns are available for use in the Selected Columns setting on the Core Search Web Part?
Well, these columns are Managed Properties, and they’re configured on the Shared Service Provider (SSP)…
And the Managed Properties page shows a large list of the properties available:
So, what is a managed property? Well, the page describes it pretty well. The search crawler gathers a bunch of crawled properties. Users search against the managed properties, and these are a way of mapping the crawled properties to the properties that people can search on. That’s what that page above is for; defining the mapping.
So where do the Crawled Properties come from? Well, they’re created by the crawler – and can be based upon metadata you’ve created in SharePoint, specifically from Site Columns. For example, I’ve set up a Site Column called Animal Name, which is just text, and added it to a document content type which I’ve used:
After a full crawl, I went and created a new Managed Property:
And I could now select my new crawled property:
And so we’ve created a new property:
I ran a full crawl again, and now I could go and add my ‘AnimalName’ property as a column into the Search Core Results Web part (as I did with FileExtension previously), and now I can get it in my search results!
Please note though – you will need to have the content with the new Site Column crawled twice – once to make it available as a crawled property, and then after you’ve created your Managed property you have to crawl again to actually populate that Managed Property.
Edit: Damn, having just written this, I found a better description from Jonathon Frost. It’s well worth a read too.