HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityLog In

Creating your project

In this step, you create an Optimizely CMS sample website, add and configure the CMS integration for Optimizely Search & Navigation, and index the initial content.

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 Create the back-end site 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.

📘

CMS 12 and Commerce 14

For Optimizely Content Cloud (CMS 12) and Optimizely Commerce Cloud (Commerce 14), see Installing Optimizely (.NET5).

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.

📘

CMS 11 and Commerce 12

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.
  1. 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 theappsettings.json file, and paste the configuration code into the relevant sections. The code to paste looks something like this:
{
  "EPiServer": {
    "Find": {
      "ServiceUrl": "https://demo01.find.episerver.net/RXQGZ5QpXU9cuRSN2181hqA77ZFrUq2e/",
            "DefaultIndex": "yourname_indexname"
    } 
  } 
}

Also enter AddFind() Startup.cs. You can also configure the index using FindOptions from code.

services.Configure<EPiServer.Find.FindOptions>(options =>
  {
    options.DefaultIndex = "INDEX";
    options.ServiceUrl = "URL";
  });
services.AddCms();
services.AddFind();
  1. 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 Scheduled job for indexing 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.


Did this page help you?