Content Classes in SharePoint Search

Content Classes make it possible to get the specific types of content you want returned from a search request.  This can be from an interactive search executed by a user or by an automatic search configured to supply content across a SharePoint farm. 

Here is a list of Content Classes as well as an overview on how specific list, library, and item classes can be structured.

  • SPSPeople – Will return only user profile objects.
  • STS_Site – Will return only site collections
  • STS_Web – Will return only sub-sites (aka webs)
  • STS_list_doccumentlibrary – Will return all document libraries.  The “documentlibrary” part can be substituted with any other standard template name or the template id for use with custom lists. 
  • STS_listitem_documentlibrary – will return all of the items from the document libraries.  Like the proceeding item “documentlibrary” specification can be replaced with the appropriate template name or id.

Custom Search Scopes

For interactive searches, performed by your users, you can define custom search scopes to narrow the search results.  In addition to specifying rules like the Content Source, you can specify the specific Content Class. 

In some cases users do not want to see Sites and Webs show up in the search results for a particular section of a site.  You can specify a rule that excludes these objects from the results for that scope.

In other cases where perhaps there are 100s of sites, a search scope that only returns Sites and Webs may be desirable. 

Using Search to Display Content

In addition to interactive searches, the search system can also be used to provide content as part of normal site configuration. 

Presentation Methods

The returned content can be configured to be displayed Core Results or People Core Results web parts.  These web parts provide the ability to configure the search query information as well as support customizing the display through XSLT.

The query can also be executed and the results displayed in a custom web part by calling either the Search API or the SPSearch.asmx web service.  This gives the developer the ability to show the content in whatever context it is required including for custom navigation or content outside of the normal page body.

Content Aggregation

It can be used to aggregate content across site collections and applications.  This is one potential method to grab news and announcements across a large site in an efficient manner.  It can also be used to pull navigation elements across site collections (with security trimming) as mentioned above.

Working With Large Lists and Libraries

It can provide an effective means to interact with a very large list or library.  Since it is relying on the index, not real-time calls against the list, performance tends to be much better.  

Department, Team, or other People

A lot of people would like a dynamic way to display the members of a department, team, or maybe cross-functional group.  Static contact lists have been around since the beginning of SharePoint, but it can be a maintenance nightmare.  By specifying the SPSPeople content class along with a query against the user’s profiles you can retrieve a list that maintains itself as the user profiles are managed.

Summary

Using the search system can provide a consistent, highly scalable way to access content throughout the farm.  Specifying the Content Class provides a means to retrieve the specific type of content you are looking for.  The resulting features are very powerful and should be in every developer and customizer’s tool bag.

Related Articles

Events – MSDN SharePoint MVP Chats Scheduled

Thanks to the success of the recent MSDN SharePoint MVP Chats two more are being scheduled.  The times for the chats have been staggered to help accommodate the community members around the globe.

April 27, 2010
4:00 – 5:00 P.M. Pacific Time

April 28, 2010
9:00 – 10:00 A.M. Pacific Time

Here is an overview:

Do you have tough technical questions regarding SharePoint for which you’re seeking answers? Do you want to tap into the deep knowledge of the talented Microsoft Most Valuable Professionals? The SharePoint MVPs are the same people you see in the technical community as authors, speakers, user group leaders and answerers in the MSDN forums. By popular demand, we have brought these experts together as a collective group to answer your questions live. So please join us and bring on the questions! This chat will cover WSS, MOSS and the SharePoint 2010. Topics include setup and administration, design, development and general questions.

The participating MVP list is pretty impressive:

  • Agnes Molnar
  • Andrew Connell
  • Asif Rehmani
  • Becky Bertram
  • Bill Simser
  • Bryan Phillips
  • Chris O’Brien
  • Clayton Cobb (InfoPath MVP)
  • Dan Attis
  • Darrin Bishop
  • David Mann
  • Gary Lapointe (is a maybe)
  • John Ross
  • Mike Oryszak
  • Muhanad Omar
  • Paul Stork
  • Randy Drisgill
  • Rob Bogue
  • Rob Foster
  • Shane Young
  • Spence Harbar

Additional details and calendar entries can be found on the MSDN Online Chats area.

Hope to see everyone there!

Content Aggregation in SharePoint 2010

One of the areas I continue to see companies struggle with is sharing and reusing content.  Many will cram everything into a single site collection, or worse yet a single web so that everything is in one spot and available.  A little over a year ago I wrote an article titled “The Importance of a Content Syndication and Aggregation Plan” where I covered a few of the method used in the 2007 version.  There were a lot of limitations with the out of the box toolset, many relating to the site topology boundaries.  The 2010 version brings a few important improvements that I think will benefit most companies.

Capabilities in SharePoint 2010

Things are vastly improved in 2010.  All of the features from 2007 are still available, and some of them have been improved.  They include:

  • Content Query Web Part (CQWP) – with SharePoint Server
  • DataView Web Part (DVWP)
  • RSS
  • Content Deployment – with SharePoint Server
  • Content Types (promote common definition and reuse)
  • Custom Web Parts

Some of the new features include:

Calendar Overlays – One of the most common requests I have received in the past is to aggregate multiple calendars.  Whether it is for doing a roll-up on the teams or groups in a department or for pulling together dates across multiple projects, people need to be able to merge calendars.  With 2010 you now have the ability to aggregate up to ten calendars in a single view.  These calendars can be in any site collection, and can even be from exchange.  This makes it super easy for example to pull together a main company calendar with the entries being managed by different departments like HR and Marketing or across divisions.

Check out Bjorn Furuknap’s blog for details.  He did a great walkthrough on how to View Multiple Calendars in SharePoint 2010 here.

Managed Metadata Service – As the name suggests, this is a centralized service that enables you to manage your terms and content types.  Previously Content Types were bound to a specific site collection and working with them in more than one site collection meant manually keeping them in sync.  Having content described consistently across an organization makes aggregating that content a whole lot easier.

Here is the documentation on TechNet for the Managed Metadata Service.

A Word of Caution

An important word of caution; just because a feature is supported does not mean it will meet your needs.  In previous versions some of the aggregation features that were available, like the ability to connect to another list in the site collection with a DVWP or CQWP, worked fine when working with a few data sources but did not scale well.  I have heard of cases where hundreds of data sources need to be aggregated into a central source.  Be sure to perform both functional and performance testing to ensure that it meets your needs and if not, look to a custom solution that fine tune the process and perhaps implement a special caching mechanism.

Think About Content During Topology Planning

As part of the site topology planning or review, it is important to think about the content that will be stored and where else it might need to be used.  Make sure that the team is familiar with the different aggregation or roll-up options and what the pros and cons are to each.   

Related Articles

SharePoint Saturday DC – DR Planning

SharePoint Saturday DC is shaping up to be a great event.  With a plan to support up to 800 attendees and over 100 sessions submitted the coordination team is putting in overtime getting everything ready.

I’m happy to announce that my session “Keys to Establishing a SharePoint Disaster Recovery Plan” has been accepted.

Here is the session abstract:

A real world guide to establishing a Disaster Recovery Plan that aligns business needs with actual IT capabilities. Covering crucial key topics such as how to prioritize your content, knowing your environment, how to establish realistic recovery estimates and how to estimate the cost associated with system downtime. With this information you will be able to validate current business requirements and assumptions, increase the reliability of the plan as well as identify improvements that can help you meet if not exceed SLAs and drive confidence in SharePoint as a business platform.

I look forward to seeing everyone there!

Event – RTP Corporate Efficiency Meetings

On Friday April 23rd I’ll be joining the team at Ultimus to show businesses how to improve Business Processes using SharePoint and Beyond.  I will be primarily covering how to realize the value of the SharePoint platform and the team from Ultimus will show how their BPM suite can leverage and any existing SharePoint investments.

There are two sessions, a breakfast session from 9am to 10am and a lunch session from 12pm to 1pm which has already been booked.  The sessions will be at the Microsoft Offices at 4825 Creekstone Drive Durham, NC 27703.

For anyone in the RTP area with interest in extending SharePoint for Business Process Management, I would recommend checking it out.

SharePoint Saturday Wrap-up

SharePoint Saturday Charlotte was another great community event.  The organizers and volunteers did a great job keeping things running smooth and everyone appeared to have a good time.  A big thank you to everyone that came out and a special thank you to the sponsors that made it all happen. 

Here is the slide deck for my session on  SharePoint 2010 Personalization.

MSDN SharePoint MVP Chat – Transcript Posted

On May 15th the team at Microsoft organized a chat giving the community access to SharePoint MVPs to help answer their questions about SharePoint.  I was fortunate enough to participate in the event and found it a lot of fun.  It was great to see the strong interest from the community and I think there were about 265 unique individuals who tuned in along with a number of the SharePoint MVPs. 

The transcript for the chat was just posted here:  http://msdn.microsoft.com/en-us/chats/ff625251.aspx

If you are interested in participating in one of these chat sessions, stay tuned because there are plans to schedule two more that will better cover other time zones for global coverage.

%d bloggers like this: