Area: Optimizely Search & Navigation
Applies to versions: Latest

2. Creating your project

Recommended reading 

In this step, you create an Optimizely CMS sample website, add and configure the CMS integration for Optimizely Search & Navigation , and do an initial content indexing. If you already have a website to which you want to add  Search & Navigation, skip the website creation step. After completing this step, you are ready to start developing.

Note: Optimizely Search & Navigation was formerly known as Episerver Find.

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 Search & Navigation to the website

Ensure that the Optimizely NuGet feed is added as a package source for the website for which you want to add Optimizely Search & Navigation. If you installed the CMS sample site, this is automatically added.

Note: If you selected the Episerver Find option while installing CMS, you can skip this step.

  1. In Visual Studio, use Solution Explorer to open the website.
  2. Right-click on References, and select Manage NuGet Packages, Online and EPiServer.
  3. Locate the EPiServer.Find.Cms package and click Install.
  4. Verify that Search & Navigation components are added under your project References.

Configuring Search & Navigation for the website

  1. Log in to your account on the Search & Navigation site, go to My Services and click index Details.
  2. Copy the configuration code snippet displayed for the web.config file.
  3. 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:
        <section name="episerver.find"
                 type="EPiServer.Find.Configuration, EPiServer.Find" requirePermission="false"/>
      <episerver.find serviceUrl="http://es-api01.episerver.com/ClDVQsXo9DlI1M6IQn6PSDwAiqRGi22G/"

    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.

  4. Open the Package Manager Console (Tools > NuGet Package Manager > Package Manager Console) and run the Update-EPiDatabase command.
  5. Rebuild the project and verify that the site is running properly.

Note: To ensure maximum availability and scaling flexibility, 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

  1. Log in to the site.
  2. Go to the CMS admin view.
  3. 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.
  4. 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.

Next steps

Do you find this information helpful? Please log in to provide feedback.

Last updated: Apr 21, 2015

Recommended reading