Area: Optimizely Commerce
Applies to versions: 10
Other versions:

Catalog product search

Recommended reading 

The catalog search API provides the functionality for finding Optimizely 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:

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.


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.

To change caching on the public site, go to the Configs\ecf.catalog.config file and change values in the <Cache/> element.

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

Last updated: Oct 24, 2016

Recommended reading