Build a SP2013 Content Enrichment Service

Hi, yes it has been a while. Its been a brutal year.  I now have 4 girls, two recent twins. Probably doubled the gray hairs on my head by now.  Had to move to a bigger home.  Had to get a minivan to accommodate the bigger family. After moving into the house, I have been fixing things for 3 months now … an still not done.  There’s much more as well. Nonetheless, here I am … now to CEWS (Content Enrichment Web Service).

So there are many articles out there, between several I was able to get something working. Lets start with the basics:

  • Content Enrichment is a process by which you can add/modify/enhance metadata to the search index directly.
  • Content Enrichment does not add metadata to the actual document or list item.
  • Content Enrichment only works for on-premise farms.  Thus, not Office 365.
  • Content Enrichment is deployed as a web service.
  • Content Enrichment can be great if done properly … poor code will slow down search very significantly.

The basic steps for creating and deploying a CEWS are:

  1. Using Visual Studio 2012 or 2013, create a WCF Service Application project.
  2. Create your Content Enrichment Service
    1. Implement the IContentProcessingEnrichmentService interface from the Microsoft.Office.Server.Search.ContentProcessingEnrichment assembly which you must reference (located at c:\Program Files\Microsoft Office Servers\15.0\Search\Applications\External\microsoft.office.server.search.contentprocessingenrichment.dll by default; unless you installed SharePoint somewhere else).
  3. Register your Content Enrichment Service with Powershell
    1. http://msdn.microsoft.com/en-us/library/office/jj163983%28v=office.15%29.aspx
  4. Test and Validate
  5. Once satisfied, package your solution
  6. Deploy your solution to Azure or IIS (or elsewhere as you need).

Here a couple other resources for more information:

  • How to: Use the Content Enrichment web service callout for SharePoint Server
    http://msdn.microsoft.com/en-us/library/office/jj163982%28v=office.15%29.aspx

  • Custom content processing with the Content Enrichment web service callout
    http://msdn.microsoft.com/en-us/library/office/jj163968%28v=office.15%29.aspx