Configure the search provider
Describes how to configure the Optimizely Search & Navigation search provider for Optimizely Commerce Connect.
The search provider is installed using the NuGet package EPiServer.Commerce.FindSearchProvider.
NoteTo get the maximum value out of Search & Navigation when developing visitor-facing features for your website, use the Search & Navigation integration for Commerce Connect.
In CMS 12,
FindSearchProvideris not used by default. Instead,Episerver.Commerce.Findis used for CMS and front-end commerce searches.FindSearchProviderand any otherSearchProvidernamespace is legacyMediachasefunctionality that can generally be ignored.
Configure the search provider
To configure the Optimizely Search & Navigation provider for Optimizely Commerce Connect:
-
Create an index at find.optimizely.com.
-
On the index's details page, make a note of the values for
serviceUrlanddefaultIndex. -
Configure
SearchOptionsin yourappsettings.jsonfile. -
Set the
DefaultSearchProviderofSearchOptionstoFindSearchProvider. -
Update the
ServiceUrlandDefaultIndexvalues to match the values from the index details page at find.optimizely.com:"EPiServer:Find": { "DefaultIndex": "(set the defaultIndex here)", "ServiceUrl": "(set the serviceUrl here)" } -
Ensure that the following item exists in the
SearchProviderslist ofSearchOptions:{ "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
Indexerslist ofSearchOptionsto use the appropriate index builder for the search service:"Indexers" : [ { "Name" : "catalog", "Type" : "EPiServer.Commerce.FindSearchProvider.FindSearchIndexBuilder, EPiServer.Commerce.FindSearchProvider" } ] -
Rebuild your search index from the Commerce Connect Admin search interface.
Notes
- The Search & Navigation search provider for Commerce Connect 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.
Updated 20 days ago
