Install and deploy search service
Describes how to install and deploy search service.
Note
The Full-text Search Service applies to Optimizely Content Management System (CMS 11) and is not supported on Optimizely Digital Experience Platform (DXP) and other cloud service deployments. It is a legacy feature that will be removed in future versions.
This section is not supported for ASP.NET Core-based applications.
Optimizely Content Management System (CMS) deploys the Search service through the NuGet package EPiServer.Search
. You can install the package on an existing site (the service then runs inside the same application as the site), or you can install the package on an empty web project. The NuGet package updates the configuration file with the service's default settings.
CMS deploys the search integration through the NuGet package EPiServer.Search.Cms
and should always be installed in a CMS website; it contains the required functionality to query the search service and integrate with CMS's user interface.
Note
The
EPiServer.Search.Cms
NuGet package was introduced in CMS 11; previously, this functionality was included in the core platform. This package is to be used when the basic search functionality is used.
Client configuration (EPiServer.Search.Cms package)
Configure the search client on the website to use the service. Set the attribute baseUri attribute for the endpoint of the service. The following example shows a default configuration:
<episerver.search active="true">
<namedIndexingServices defaultService="serviceName">
<services>
<add name="serviceName"
baseUri="http://sitehost/IndexingService/IndexingService.svc"
accessKey="local" />
</services>
</namedIndexingServices>
<searchResultFilter defaultInclude="true">
<providers />
</searchResultFilter>
</episerver.search>
Service configuration (EPiServer.Search package)
The default configuration allows local connections; requests originating from the same server are allowed. If you deploy the Search service to another machine than the site, then specify the ipAddress
and ip6Address
attributes  as follows:
<episerver.search.indexingservice>
<clients>
<add name="local"
description="local"
allowLocal="true"
ipAddress="<ipaddress here>"
readonly="false"/>
</clients>
<namedIndexes defaultIndex="default">
<indexes>
<add name="default"
directoryPath="[appDataPath]\Index"
readonly="false"/>
</indexes>
</namedIndexes>
</episerver.search.indexingservice>
You can also configure the service to accept requests from IP addresses and use an access key instead, which is useful in cloud environments where IP addresses are not known. In that case, the client configuration on the site should specify an access key and a client configuration  with the same name as the accessKey
 should exist on the service configuration, as shown in the following example:
Client configuration:
<episerver.search active="true">
<namedIndexingServices defaultService="serviceName">
<services>
<add name="serviceName"
baseUri="http://<yoursearchsite>/IndexingService/IndexingService.svc"
accessKey="C7184E3ED7134895B3E95AB3AB4F4AE5" />
</services>
</namedIndexingServices>
<searchResultFilter defaultInclude="true">
<providers />
</searchResultFilter>
</episerver.search>
Server configuration:
<episerver.search.indexingservice>
<clients>
<add name="C7184E3ED7134895B3E95AB3AB4F4AE5"
description="local"
allowLocal="false"
ipAddress="0.0.0.0/0"
ip6Address="::/0"
readonly="false" />
</clients>
<namedIndexes defaultIndex="default">
<indexes>
<add name="default"
directoryPath="[appDataPath]\Index"
readonly="false" />
</indexes>
</namedIndexes>
</episerver.search.indexingservice>
Deploy the site
When you deploy the site to production, update the baseUri to the production search service. When you deploy the Search service to production, you might need to update the allowed IP addresses if you use that configuration.
Host the service in IIS
To host the service in IIS, enable the Windows feature HTTP Activation (on Windows server: typically Roles and Features > .NET Framework 4/4.5 Features > WCF Service).
Logging
The search indexing service uses the Logging. Make sure there is a provider such as EPiServer.Logging.Log4Net
installed to enable logging.
Updated 6 months ago