In this step, you create an Episerver CMS sample website, add and configure the CMS integration for Episerver Search & Navigation (formerly Episerver Find), and do an initial content indexing. If you already have a website to which you want to add Episerver Search & Navigation, skip the website creation step. After completing this step, you are ready to start developing.
Creating the website
Follow steps 1-2 in Creating your project for CMS. In step 3, select Alloy (MVC) to create a sample website based on MVC. Let the installation finalize, and open the website in a browser to ensure that it is working properly.
Adding Episerver Search & Navigation to the website
Ensure that the Episerver NuGet feed is added as a package source for the website for which you want to add Episerver Search & Navigation. If you installed the Episerver sample site, this is automatically added.
Note: If you selected the Episerver Find option while installing the Episerver CMS, you can skip this step.
- In Visual Studio, use Solution Explorer to open the website.
- Right-click on References, and select Manage NuGet Packages, Online and EPiServer.
- Locate the EPiServer.Find.Cms package and click Install.
- Verify that Episerver Search & Navigation components are added under your project References.
Configuring Episerver Search & Navigation for the website
- Log in to your account on the Episerver Search & Navigation site, go to My Services and click index Details.
- Copy the configuration code snippet displayed for the web.config file.
- In Visual Studio, go to your solution, open the web.config file, and paste the configuration code into the relevant sections. The code to paste looks something like this:
<configuration> <configSections> <section name="episerver.find" type="EPiServer.Find.Configuration, EPiServer.Find" requirePermission="false"/> </configSections> <episerver.find serviceUrl="http://es-api01.episerver.com/ClDVQsXo9DlI1M6IQn6PSDwAiqRGi22G/" defaultIndex="yourname_testing"/> </configuration>
Note: Check your web.config file to see if it already has these snippets. If it does, replace them with snippets copied from the Index Details screen. The elements reside in two different parts of the web.config.
Note: Check the <handlers> section of your web.config for a duplicate ExtensionlessUrlHandler-Integrated-4.0 statement. If there are two, delete one of them.
- Open the Package Manager Console (Tools > NuGet Package Manager > Package Manager Console) and run the Update-EPiDatabase command.
- Rebuild the project and verify that the site is running properly.
Note: To ensure maximum availability and scaling flexibility, Episerver Search & Navigation uses dynamic IP ranges. For example, if you require whitelisting of IP addresses in the firewall, make sure that your firewall supports domain-based whitelisting.
Indexing the website
- Log in to the site.
- Go to the CMS admin view.
- Select Find Indexing Job and click Start Manually. This action indexes the site content. Note that you do not need to set up the indexing scheduled job to run automatically, since content changes are instantly indexed.
- Log in to the CMS edit view, go to Find > Overview > Explore to view the index. For the sample site, you see something like this:
Note: If multiple sites are associated with the index, objects from other sites may appear. See Indexing for information about how indexing works.
- Continue to creating the basic search.
Last updated: Apr 21, 2015