SharePoint Search Runbook - CEWS Pipeline Toolkit

This post may be used as a reference to help create or update a SharePoint search runbook.

CEWS Pipeline Toolkit

CEWS Pipeline Toolkit is a content processing framework for search that supports both Content Enrichment Web Service (CEWS) in SharePoint 2013/2016 and the Pipeline Extensibility feature in FAST Search for SharePoint 2010. The tool comes with an installer and graphical user interface. Developers may configure and test pipelines using the built-in modular stages, or develop totally custom processing using Visual Studio and the included sample projects. Pipelines can be executed offline without SharePoint installed, or integrated as part of SharePoint's processing. The CEWS Pipeline Toolkit has a low overhead, is modular, and extensible. (TechNet documentation)

Steps to install

  1. Install CEWS Pipeline Toolkit
  2. Open a PowerShell Script as admin and cd to the “$($Env:CEWS)\scripts” directory
  3. Run the script Install-CEWSWindowsService.ps1
  4. Verify the windows service is running (Sp2013ContentEnrichmentWebService)
  5. Edit or copy custom configuration files (CEWS.PipelineConfig.xml, Register-CEWS.config) to the CEWS\etc directory
  6. Copy the custom .dll from the Visual Studio output directory to CEWS\bin
  7. Run Register-CEWS.ps1 (all crawls must be stopped or paused)
  8. Verify the managed properties were created as expected
  9. Restart the windows service (Sp2013ContentEnrichmentWebService)
  10. Start a crawl and verify the managed properties get populated 

Steps to update the configuration

Register-CEWS.config

  1. Edit Register-CEWS.config
  2. Run Register-CEWS.ps1 (all crawls must be stopped or paused)
  3. Verify the managed properties were created as expected
  4. Start a crawl and verify the managed properties get populated 

CEWS.Pipeline.config

  1. Edit CEWS.PipelineConfig.xml
  2. Restart the windows service (Sp2013ContentEnrichmentWebService)
  3. Start a crawl and verify the managed properties get populated 

Steps to update DLL

  1. Stop the windows service (Sp2013ContentEnrichmentWebService)
  2. Copy .dll from Visual Studio output directory to CEWS\bin
  3. Start the windows service (Sp2013ContentEnrichmentWebService) 

Steps to Unregister the SharePoint CEWS callout

The only reason to run the unregister command would be to stop all custom processing. Note that this command requires all crawls to be stopped.

  1. Run UnRegister-CEWS.bat (all crawls must be stopped)

 

Helper scripts

Restart CEWS Pipeline Toolkit windows service on all servers

# restart Windows Services
#$servers = Get-Content .\serverList.txt
$servers = @("server1","server2")
$services = @("SharePoint2013ContentEnrichmentWebService")

foreach($service in $services)
{
    foreach($server in $servers)
    {
     $sc = sc.exe "\\$server" query $service
      if($sc[3].Contains("RUNNING"))
        {
            "Stopping service $service on server $server"
         $t = sc.exe "\\$server" stop $service
            sleep 1
        }
        else
        {
            "Service $service is already stopped on server $server"    
        }
    }

    foreach($s in $servers)
    {
     $sc = sc.exe "\\$server" query $service
      if($sc[3].Contains("STOPPED"))
        {
            "Starting service $service on server $server"
         $t = sc.exe "\\$server" start $service
            sleep 1
        }
        else
        {
            "Service $service is already started or starting on server $server"
        }
    }
}