Sana Assistant (online)
Table of Contents

ProductSearchExtension reference

This article provides reference material about ProductSearchExtension class. All product search extensions have to be inherited from the ProductSearchExtension which, in turn, inherits from the core Sana Extension class.

ProductSearchExtension class

Properties

SupportedFilterOperators

The filter operators supported by extension.

Multiple values are allowed.

Example:

public override ProductSearchFieldFilterOperators SupportedFilterOperators =>
    ProductSearchFieldFilterOperators.Equal |
    ProductSearchFieldFilterOperators.Contains;

SupportsExternalFields

The value indicating whether fields other than configured in Sana can be used by extension for sorting and facets.

SupportsSearchSuggestions

The value indicating whether search suggestions are supported by extension.

SupportsFacetValuesSorting

The value indicating whether facet values sorting is supported by extension.

SupportsFacetValuesMultiSelect

The value indicating whether multiple facet values selection for each facet is supported by extension.

Methods

GetFacetsAsync

Gets the available product facets with values.

GetSearchSuggestionsAsync

Gets the product search suggestions.

Is relevant only when SupportsSearchSuggestions, NotSupportedException can be thrown otherwise.

GetSortFieldsAsync

Gets the sort fields configured on the extension side.

Is relevant only when SupportsExternalFields, NotSupportedException can be thrown otherwise.

SearchAsync

Searches the products.

See also