Storefront search overview

An overview of search-related features in Composable Commerce that enhance product discoverability through your storefront.

To create performant storefront product search experiences for your customers, you can use the Product Projection Search or Product Search APIs.

They are both designed to suit a variety of product search use cases, such as product listing and category landing pages. The functionalities of both APIs are compared in Product Search versus Product Projection Search.

For full-text searches, you can also implement a basic auto-complete functionality using the Product Suggestions API.

Product indexing

Indexing is a process carried out by the API to build the search index for your product information, which is optimized for read access with low response times. If the product information is retrieved—using the Products API or Product Projections API—before indexing is complete, the product information in the search index can differ. The search index is automatically updated whenever Products are changed.

FunctionalityProduct SearchProduct Projection Search
Indexed projection of the Productscurrentcurrent and staged
Support for Standalone Pricesfor sorting, filtering, and faceting
Support for Product SelectionsproductSelections keyword field-
Support for Storesstores keyword field
Support for validity periods of Pricesvariants.prices.* keyword fields

Query expressions

FunctionalityProduct SearchProduct Projection Search
Full-text searchfullText query expressiontext.{language} query parameter
Fuzzy searchfuzzy and fuzzyLevel query parameters
Exact matchexact query expressionfilter and filter.query query parameters
Range of valuesrange query expression{from} to {to} operator on filters
If field existsexists query expressionexists and missing operators on filters
Prefix matchprefix query expression
Wildcard matchwildcard query expression
Boosting particular searchable fieldsboosting
Specify query expressions per searchable fieldby field namefor filters, but not for full-text search
Operators to define compound expressionsand, or, not, filter operatorsPassing multiple filter parameters in one search request combines them with an AND operator. Specifying multiple comma-separated values in one filter parameter combines them with an OR operator.

Query result

By default, the Product Search API returns only the IDs of the matching Products. You can use the returned Product IDs to retrieve the full projection of a Product (Get Product Projection by ID).

FunctionalityProduct SearchProduct Projection Search
IDs of the matching Productsby default
Full representations of the matching Productswith ProductSearchProjectionParams BETAby default
Price selectionwith ProductSearchProjectionParams BETAwith query parameters
Scoped Price searchwith query parameters

Filtering

FunctionalityProduct SearchProduct Projection Search
Filter by Category, Attribute values, Product Type, and Price.

Faceting

FunctionalityProduct Search BETAProduct Projection Search
Count all occurrences of distinct values.distinct facetsTermFacet
Count Products that have values within a specified range.ranges facetsRangeFacet
Count the number of Products or Product Variants.count facetscounting products parameter
Allow for handling missing values when calculating facets.missing values
Specify scope of facets.scoping of facetsfilter or filter.query query parameters

Sorting

FunctionalityProduct SearchProduct Projection Search
Sort order (ascending or descending)asc and desc sort orderasc and desc sorting
Sort mode to specify which value to sort on when Product contains multiple values for the fieldmin, max, avg, sum sort modeasc.min, asc.max, desc.min, desc.max for sorting by values on Product Variants
Specify exactly which resources should be considered for sorting.sort filter