Loading...
Area: Optimizely Commerce
Applies to versions: 14 and higher
Other versions:

Configuring Optimizely Search & Navigation search provider

Recommended reading 

This topic describes how to configure the Optimizely Search & Navigation (formerly Find) search provider for Optimizely Commerce. The search provider is installed using the NuGet package EPiServer.Commerce.FindSearchProvider.

Note: To get the maximum value out of Search & Navigation when developing visitor-facing features for your website, you should use the Search & Navigation integration for Commerce.

Configuration steps

To configure the Optimizely Search & Navigation provider for Commerce, follow these steps.

  1. Create an index at find.episerver.com.
  2. Go to the index's details page, and make a note of the values for serviceUrl and defaultIndex.
  3. Setup SearchOptions in your appsettings.json file
  4. Set the DefaultSearchProvider of the SearchOptions to FindSearchProvider.
  5. Update ServiceUrl and DefaultIndex values to match the values from the index details page at find.episerver.com
    "EPiServer:Find": {
      "DefaultIndex": "(set the defaultIndex here)",
      "ServiceUrl": "(set the serviceUrl here)"
    }
  6. Ensure that the following item exists in the SearchProviders list of SearchOptions.
    {
      "Name": "FindSearchProvider",
      "Type": "EPiServer.Commerce.FindSearchProvider.FindSearchProvider, EPiServer.Commerce.FindSearchProvider",
      "Parameters": {
        "queryBuilderType": "EPiServer.Commerce.FindSearchProvider.FindSearchQueryBuilder, EPiServer.Commerce.FindSearchProvider",
        "simulateFaceting": "true"
      }
    }
    
    Change the item in the indexers list of SearchOptions to use appropriate index builder for the search service:
    "Indexers": [
      {
        "Name": "catalog",
        "Type": "EPiServer.Commerce.FindSearchProvider.FindSearchIndexBuilder, EPiServer.Commerce.FindSearchProvider"
      }
    ]
    
  7. Rebuild your search index from the Commerce Admin search interface.

Notes

  • The Search & Navigation search provider for Commerce matches only the basic query string against fields of type integer or string. While catalog meta-fields of type float, double, or decimal may be marked as Include in Default Search in the meta-field configuration interface, these fields are not matched against the basic query string.
  • Other querying (filters, queries, or faceting against specific fields) functionality works on meta-fields of type float, double, or decimal.
  • If you want to match against these data types from a basic query string, store the data in a string-typed meta-field, and mark that field as Include in Default Search.

Related topics

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

Last updated: Sep 28, 2021

Recommended reading