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

 

Change the global SharePoint 2013 Label

Hi All,

Something I find very useful when working with clients is to help them distinguish each environment between development (DEV), testing (TEST), Staging (STAGE) and Production (PROD). Some clients may have even more environments.  Lets take a look at the change in the UI first…

This is the Out of the Box label (Before):

SharePoint Label Out of the Box

 

This is the customized label (After):

SharePoint Label modified

 

So how do we do it, we use PowerShell to change the label at the web application level:

Add-PSSnapin *share*
$webapp = Get-SPWebApplication http://bcdevsp2013
$webapp.SuiteBarBrandingElementHtml = “SharePoint DEV”;
$webapp.Update();

I hope this comes in handy.  It is a subtle thing, but very helpful throughout the application lifecycle.

Cheers,

Brian

PS – Happy New Years to everyone.

Add Farm Administrator via Powershell

I cant say how many times I’ve had to add myself or another account as a Farm Administrator, and I keep misplacing my scripts.  So lets try my blog, and now it helpful to everyone 🙂

Adding a user to the “Farm Administrators” group effectively will add you to the local machine group WSS_ADMIN_WPG on every server of the SharePoint farm and assigns the SharePoint_Shell_Access role in the SharePoint Configuration database and the Central Administration database.

#################################################
# Add a new Farm Administrator
#################################################
Add-PSSnapin *SharePoint* -erroraction SilentlyContinue
Write-Host
$newFarmAdmin = Read-Host -Prompt 'Enter the new Farm Administrator (i.e. DOMAIN\Username): '
Write-Host
$webApp = Get-SPWebApplication -IncludeCentralAdministration | where-object {$_.DisplayName -eq "SharePoint Central Administration v4"}
$site = $webApp.Sites[0];
$Web = $site.RootWeb;
$farmAdministrators = $web.SiteGroups["Farm Administrators"];
try {
   $farmAdministrators.AddUser($newFarmAdmin, "", $newFarmAdmin, "");
   $contentDB = Get-SPContentDatabase -WebApplication $webApp
   Add-SPShellAdmin -Database $contentDB -Username $newFarmAdmin
   Write-Host "Completed Succesfully!"
} catch {
   Write-Host 'Error: Failed to add user.' -ForegroundColor Red
   Write-Host ('Reason: ' + $_)  -ForegroundColor Red
}
$web.Dispose();
$site.Dispose();

Cheers!

 

SharePoint Fest DC August 2013

I'mSpeakingDC2013

I am very excited to be participating in the Sharepoint Fest DC in August 2013! I hope the attendance is great and look forward to learning and sharing knowledge with different audiences!
I invite all of you to register for the event early since the prices will increase on May 31/2013 –> register here!, who wouldn’t want to do an early bird registration for this great event? 🙂

Enter the code Culver100DC when you register for an extra $100 off !  Please make sure you enter it exactly as it is here (pesky spaces will cause for it not to work)

Some of my sessions include topics such as:

SharePoint 2013 Extranets: How will SharePoint 2013 connect you to your partners?
How will SharePoint 2013 allow organizations to collaborate and share knowledge with clients and partners? SharePoint empowers organization to build extranet sites and partner portals inexpensively and securely. Learn about the Product Catalog site template and how you can to use it. Learn about the new improvements in SharePoint 2013 regarding extranets. Learn how SharePoint 2013 can help your organization open its doors to its clients and partners securely.

Build scalable SharePoint 2013 Staged Workflows to run locally and in the Cloud
SharePoint 2013 now supports two workflow platforms. We will walk through using the two workflow platforms and how they are different. We will configure the SharePoint 2013 Workflow Manager and build a workflow that can run locally and in the Azure cloud seamlessly.

You will be able to attend technical classes and seminars (view full agenda here>>) – taught by Microsoft Certified Trainers, Microsoft engineers and Microsoft MVPs where there will be sessions created for SharePoint administrators, software developers, information architects and knowledge workers which will guarantee to truly help you leverage SharePoint in your current environment.