Dealing with custom content source in SharePoint Search

By default, SharePoint 2007 family (MOSS/MSS) supports the following content sources: Web sites, SharePoint Sites (WSS/SharePoint Server), Exchange Public Folders(through OWA), File Shares, Lotus Notes databases on Domino Server. Through BDC and user profiles/My sites, Microsoft Office SharePoint Server 2007 has two more content sources: databases and people profiles.

Yes, we can use Protocol Handlers(It is also called "connectors", don't be confused, protocol handler is not a friendly name to most of the people so we changed it) to index other contents. A protocol handler can be implemented in C++, and also C# if you don't care about the performance. So, you can give the database ability to Search Server 2008, you can connect some other things like FileNet and Documentum... By creating a protocol handler, you can also have the ability to control security trimming, a much better and wiser way than custom security trimmer.

But how can I add/remove/edit a custom content source after the new protocol handler is registered?

The answer is: using object model. You can find CustomContentSource under Microsoft.Office.Server.Search.Administration namespace. I have a open source administration tool at (SharePoint Search Admin).

There's an interesting member in CustomContentSource: Tag. By modifying this property, you can set an URL of the page to modify the settings for a custom content source. Don't forget to append CustomContentSource.Id after the page, otherwise how can the page know which content source should it open?

For example, you can specify http://moss:90/Edit.aspx as a edit page. If the Id property of current content source is 45, the actrual link would be something like http://moss:90/Edit.aspx?cid=45.

Last but not the least important, custom content source is not limited to only new protocol handlers. You can also add something like file://, http:// or even notes:// to it.

So why not make a content source edit page for Lotus Notes? Yes! You can replace the original lame one and use your own! Check out SharePoint Search Admin, you will find the option is already there for you:)

(Still jet-lagging...See you in Seattle!)

Skip to main content