What columns can I use in my Search Results?

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)…

The Search Setting Page

And the Managed Properties page shows a large list of the properties available:

The Managed Properties Page

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:

Document Library with 'Animal Name' site column

After a full crawl, I went and created a new Managed Property:

New Managed Property Page

And I could now select my new crawled property:

Crawled Properties dialog show the Animal Name property

And so we’ve created a new property:

Managed Property Page showing our 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!

Search Results Page showing the new Managed Property

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.

Advertisements
What columns can I use in my Search Results?

8 thoughts on “What columns can I use in my Search Results?

  1. Michael says:

    Hi
    At first thanks for the information, but I have a specisl problem which was working in MOSS 2007. Get list custom columns in Crawled Properties.

    (1) I created a new column in my list with the name myColumn
    (2) I initialised a full crawl.
    (3) I was looking under SEARCH ADMIN –>METADATA PROPERTIES –>CRAWLED PROPERTIES and for an entry under ows_myColumn but their is NO enty showing up …???

    Any Idea?
    Is it not possible to search for custom columns in lists anymore in SharePoint 2010 ???

    Regards

    Michael

    Like

    1. Sorry, I don’t know about that one – currently all my projects are still 2007, I’ve not had a look at 2010. I’d be surprised if there is no Search though.

      Like

  2. Hi Andy,

    Thanks for such a nice article.
    I have used your blog’s info on my blog and redirecting users to your blog site for more information.

    Hope it is fine for you.

    Thanks,
    Dhawal

    Like

  3. Adrian says:

    @Michael. I think the reason why you cannot map the new column that you created is because it does not have a content. No records is with content in the new field šŸ™‚ You should add content to the field before triggering full crawl.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s