After running into a few problems, I thought it would be a good idea to blogg about this, since the information about EPiServer Search is very limited and fragmented on the web.
Installing EPIServer Seach
After you have installed EPiServer Search from Deployment Center, some elements have been added to your web.config, .dll files into bin folder and a new folder called IndexingService containing a file called IndexingService.svc. The .svc file should be include to your project before you recompiling.
<configuration>
<configSections>
<section name="episerver.search" type="EPiServer.Search.Configuration.SearchSection, EPiServer.ApplicationModules" />
<section name="episerver.packaging" type="EPiServer.Packaging.Configuration.EPiServerPackagingSection, EPiServer.Packaging" />
<section name="episerver.search.indexingservice" type="EPiServer.Search.IndexingService.Configuration.IndexingServiceSection, EPiServer.Search.IndexingService" />
If you need to setup with more then one binding per site, ex. mycompany.com and mycompany.no, you’ll need to add <serviceHostingEnviroment multipleSiteBindingEnable= ”true”>, as shown below. This is not included in the default installation, so you would need to add this one yourself.
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="IndexingServiceCustomBinding" maxBufferPoolSize="1073741824" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
<readerQuotas maxStringContentLength="10000000" />
</binding>
</webHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
Default from installation, the baseUri would be setup with localhost. You would have to replace this with a correct dns name.
<episerver.search active="true">
<namedIndexingServices defaultService="serviceName">
<services>
<!--<add name="{serviceName}" baseUri="{indexingServiceBaseUri}" accessKey="{accessKey}"/>-->
<add name="serviceName" baseUri="http://www.xxxx.com/IndexingService/IndexingService.svc" accessKey="local" />
</services>
</namedIndexingServices>
<searchResultFilter defaultInclude="true">
<providers />
</searchResultFilter>
</episerver.search>
The [appDataPath] is defined in EpiServerFrameWork.config. I would recomind to have the index as a subfolder in vpp. During installation of search you would have choose a place to put it.
<episerver.packaging protectedVirtualPath="~/CMS/" />
<episerver.search.indexingservice>
<clients>
<!--add name="example" description="example" ipAddress="127.0.0.1/8,192.168.0.0/24" ip6Address="" allowLocal="true|false" readonly="true|false" /-->
<add name="local" description="local" allowLocal="true" readonly="false" />
<!--add name="example" description="example" ipAddress="127.0.0.1/8,192.168.0.0/24" ip6Address="" allowLocal="true|false" readonly="true|false" /-->
</clients>
<namedIndexes defaultIndex="default">
<indexes>
<add name="default" directoryPath="[appDataPath]\Index" readonly="false" />
</indexes>
</namedIndexes>
</episerver.search.indexingservice>
<location path="IndexingService/IndexingService.svc">
<system.web>
<httpRuntime maxQueryStringLength="65536" />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="65536" />
</requestFiltering>
</security>
</system.webServer>
</location>
Testing of the service
After you have installed the search and verified the web.config you can test if the service is running by type this url into a browser : http://www.xxxx.com/IndexingService/IndexingService.svc. Don’t worry about that the endpoint isn’t found, if it work it should look like this. If you don’t get this up read last chapter about other problems you could run into or your web.config isn’t correct modifed.
Indexing the site(s)
To my big surprise EPiServer got a hidden feature! You can index the site, by typing this url into a browser: http://www.xxxx.no/EPiServer/CMS/Admin/IndexContent.aspx.
(Tips from Fredrik Haglund )
If you open a file browser and navigate [appDataPath]\Index\main you will see that the files is started to be generated. So now you know its running. Depending of the size of the site, it could take some time to index it. For me it took about 20 min to index 6000 pages.
Other problems you could run into
If you got problems with that IIS isn’t recognize the svc file. You should check if WCF for .net framework 3.5 is installed.
If you have upgraded an old EPiServer site which runs under .net framework 2.0, would be to check that you have added “svc-Integrated-4.0" under
<add name="svc-Integrated-4.0" path="*.svc" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />
A special feature you must check, if you are going to run on window 2012 server is to check if «HTTP Activation» under the feature .net framework 3.5 is enabled. Last tips are that you could also download the tool LUKE (http://luke.codeplex.com/) to be able to analyze and maintain the lucene index.