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
- Install CEWS Pipeline Toolkit
- Open a PowerShell Script as admin and cd to the “$($Env:CEWS)\scripts” directory
- Run the script Install-CEWSWindowsService.ps1
- Verify the windows service is running (Sp2013ContentEnrichmentWebService)
- Edit or copy custom configuration files (CEWS.PipelineConfig.xml, Register-CEWS.config) to the CEWS\etc directory
- Copy the custom .dll from the Visual Studio output directory to CEWS\bin
- Run Register-CEWS.ps1 (all crawls must be stopped or paused)
- Verify the managed properties were created as expected
- Restart the windows service (Sp2013ContentEnrichmentWebService)
- Start a crawl and verify the managed properties get populated
Steps to update the configuration
Register-CEWS.config
- Edit Register-CEWS.config
- Run Register-CEWS.ps1 (all crawls must be stopped or paused)
- Verify the managed properties were created as expected
- Start a crawl and verify the managed properties get populated
CEWS.Pipeline.config
- Edit CEWS.PipelineConfig.xml
- Restart the windows service (Sp2013ContentEnrichmentWebService)
- Start a crawl and verify the managed properties get populated
Steps to update DLL
- Stop the windows service (Sp2013ContentEnrichmentWebService)
- Copy .dll from Visual Studio output directory to CEWS\bin
- 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.
- 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"
}
}
}