Step 2. Add and configure a new CEWS Service Service
In the selector dialog click on SharePoint 2013 CEWS Listener
In the Service endpoint enter http://0.0.0.0:62028/CEWebService.svc to let the service listen on all available network interfaces or a specific IP address if desired
Check the Filter return box and add the names of the Properties to be returned by this Content Enrichment service. These must be the same fields as configured with SharePoint's Set-SPEnterpriseSearchContentEnrichmentConfiguration cmdlet. If this is not configured, the default return values are returned with any custom properties populated in the workflow.
An application tag is added to the settings.xml file, for example:
<application config="com.searchtechnologies.aspire:app-sp2013-content-enrichment" id="13">
<properties>
<property name="debug">false</property>
<property name="endpoint">http://0.0.0.0:62027/CEWebService.svc</property>
<property name="filterReturn">true</property>
<property name="returnProperties">Author,Title</property>
<property name="contentSource">CEWSWorkflow</property> <!-- only required in versions before 2.2 -->
<property name="workflowReloadPeriod">15s</property>
<property name="workflowErrorTolerant">false</property>
</properties>
</application>
Step 3. Configure data enrichment through a groovy script in the workflow
Once the SP2013 Content Enrichment service has been created, you can modify the workflow responsible for populating the properties/fields returned to SharePoint. Only the onProcess workflow is available, but all Aspire workflow functions may be used.
Additionally, all fields passed into the service are returned as well.
Those fields must be defined when configuring SharePoint.
For details on using the Workflow section, please refer to Workflow introduction.
SharePoint Content Enrichment Configuration
On the SharePoint box we need to configure CEWS to communicate with the our new Aspire endpoint. We need to specify which properties Aspire will be consuming and which properties we will be returning.
We also can configure how to handle the raw document.
Below are the PowerShell commands required to update the CEWS configuration:
# Get the Search Service Application for later
$ssa = Get-SPEnterpriseSearchServiceApplication
# Create a new CEWS config
$config = New-SPEnterpriseSearchContentEnrichmentConfiguration
# Set the endpoint value
$config.Endpoint = "<URLToWebService>"
# Set the Debug value
$config.DebugMode = $False
##############################################################
# IMPORTANT! if you set debug on then the next two parameters#
# are ignored! #
# Debug sends all managed properties instead of the ones you #
# are requesting. It will also ignore any response you send! #
##############################################################
# Set all properties you will send to CEWS,
# You can also use $config.InputProperties.add("xxx")
$config.InputProperties = "Author", "Filename", "Title"
# Set properties you will export Same process as import properties
$config.OutputProperties = "Author", "Title"
# Do you want the full document to be sent via CEWS (this is a relatively significant performance impact.) ?
$config.SendRawData = $True
# Set the max size of the raw document to 8MB or as desired.
$config.MaxRawDataSize = 8192
# Update the configuration sending the Config and The SSA you just defined
Set-SPEnterpriseSearchContentEnrichmentConfiguration -SearchApplication $ssa -ContentEnrichmentConfiguration $config
The configuration can be removed with:
# Get the Search Service Application for later
$ssa = Get-SPEnterpriseSearchServiceApplication
Remove-SPEnterpriseSearchContentEnrichmentConfiguration -SearchApplication $ssa
You can get the current configuration for review or update with: