This content is archived. See latest version here

Last updated: Feb 23 2015

Installation

The Search service is deployed through NuGet package EPiServer.Search. You can either install the package on an existing site (the service is then running inside the same application as the site) or you can install the package on an empty project (for example, an empty web project). The NuGet package will update the configuration file with default settings for the service.

Installation of EPiServer.Search package requires NuGet Manager version 2.6 or later.

Client configuration

You need to configure the search client on the web site to use the service. You need to set the attribute baseUri attribute to the endpoint for the service. The default configuration could look something like:

<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

The default configuration is set to allow local connections, that is, requests originated from the same server are allowed. If the Search service is deployed to another machine than the site then the attributes ipAddress and ip6Address can be used as specified below:

<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>

Another option is to configure the service to accept requests from all IP addresses and use an access key instead. This is, for example, 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 on the service configuration there should exist a client configuration with same name as the accessKey, as specified below:

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>

        

Deployment

When deploying the site to production you should update the baseUri to the production search service. When deploying the Search service to production, you might need to update the allowed IP addresses if that configuration is used.

IIS hosting

To host the service in IIS you need to enable the Windows feature HTTP Activation (on Windows server typically "Roles and Features->.NET Framework 4/4.5 Featues->WCF Service").

Logging

The search indexing service is using the Logging API, make sure there is a provider such as EPiServer.Logging.Log4Net installed to enable logging.

See also


Do you have feedback on this documentation? Send an email to documentation@episerver.com. For development-related questions and discussions, refer to our Forums on https://world.episerver.com/forum/