HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback


The catalog search API provides the functionality for finding Optimizely Customized Commerce products via two methods: **search providers** and ICatalogSystem.

## Search providers

Catalog Search API uses an index-based search engine to provide powerful search functionalities. Optimizely Commerce includes the following search providers:

  • LuceneSearchProvider (the default search provider for the _EPiServer.Commerce.Core_ package)

  • [Search & Navigation SearchProvider](🔗) (a separate package)

Commerce 10-13

  • [Configure Solr search provider \[Legacy\]](🔗) (separate packages). Not supported with Commerce 14 and higher.

Catalog Search API is used mostly on the front-end and provides advanced functionality for website visitors.

## Implementation examples

The following examples show how to implement search features.

### Simple catalog entry search



For LuceneSearchProvider, the SearchPhrase property can contain full Lucene syntax, like **title:"The Right Way" AND text:go**.

### Fuzzy search results

The following example shows fuzzy search results, where approximate results are returned.



To learn more about fuzzy search, see [Fuzzy Query](🔗) and [Fuzziness](🔗). Note that Fuzziness is based on [Levenshtein distance](🔗).

### Catalog entry search with paging

The following example shows how to return catalog entries from the search API and to bind directly to Web Controls like grid.



## ICatalogSystem methods

ICatalogSystem provides several methods for finding nodes and entries with specific criteria. The methods use SQL internally and might not be as fast or powerful as search providers. The following example shows browsing catalogs and categories.



### Caching

The search API caching is flexible and lets the developer control how search handles caching. You can specify whether results are cached (CacheResults (bool) property), and if so, the amount of time for which they are cached (CacheTimeout (TimeSpan) property). You generally want to cache simple search requests, like browsing major categories; it benefits the site performance because the requests are the same for a large audience. On the other hand, you might not want to cache keyword searches, because those are unique to a user and have a smaller chance of benefiting from caching.

**[New in Commerce 14]**

To change caching on the public site, use CatalogCacheOptions class, see [Caching](🔗).