Content Classes and Search

So I was playing with SharePoint search a while back, and I was wanting to display some results differently based upon what type of item the result was for.

It turns out that there is a node in the results xml file that shows this – ContentClass :

Results XML showing ContentClass

As you can see, the first highlighted result is STS_ListItem_DocumentLibrary. Pretty clear what that is. Not all results actually have a content class – the second highlighted result is from a document on a file share, and it doesn’t have a ContentClass.

So what content classes are there? Well, Dan Attis has a good list, along with a caveat about Welcome pages in the results. There is a similar list here. (Nobody mentions not having a ContentClass though). But unfortunately, I don’t know how to add new content classes

Advertisement
Content Classes and Search

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 )

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.