Loading...
Area: Optimizely CMS
ARCHIVED This content is retired and no longer maintained. See the latest version here.

Recommended reading 

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 configruation file with default settings for the service.

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

XML
<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 configruation is set to allow local connections, that is requests originated from same server is allowed. If Search service is deployed to another machine than the site then either can attributes ipAddress, ip6Address be used as specified below:

XML
<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 request from all IP addresses and instead use an accesskey. This is for example useful in cloud environments where ip address are not known. In that case the client configruation on the site should specify an accesskey and on the service configruation there should exist an client configuration with same name as the accessKey as specified below:

Client configruation:


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


<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 site to production you should update the baseUri to the production search service. When deploying 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 Window feature HTTP Activation (on Windows server typically "Roles and Features->.NET Framework 4/4.5 Featues->WCF Service").

See also

  • The Configuring EPiServer Full-Text Search Client section in the EPiServer Framework SDK for more information on how to configure the search client on the web site.
  • The Configuring EPiServer Full-Text Search Service section in the EPiServer Framework SDK for more information on how to configure the search service.
Do you find this information helpful? Please log in to provide feedback.

Last updated: Jul 09, 2014

Recommended reading