Loading...
Area: Episerver Commerce
Applies to versions: 10 and higher
Other versions:

Creating a search provider

This topic describes how to extend your Episerver Commerce solution by creating your own search provider. The examples in this topic are based on Lucene and Solr. See also Customizing Search.

Classes in this topic are available in the following namespaces:

  • Mediachase.Search
  • Mediachase.Search.Extensions
  • Mediachase.Search.Extensions.Indexers

Implementing a search provider

To implement a new search provider or extend or replace an existing one, create a new class that implements the SearchProvider abstract class. That class contains one method that performs the search, while the others deal with indexing the data. It is typically much easier to take one of the existing implementations (Solr or Lucene) as a starting point.

The main classes in this Solr implementation example are:

  • SolrSearchProvider. The main class.
  • SolrSearchQueryBuilder. Converts ISearchCriteria to the provider native language and is called within the Search method of the provider.

Related topic

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

Last updated: Oct 24, 2016