Storefront search overview

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

Ask about this Page
Copy for LLM
View as Markdown
To create performant storefront product search experiences for your customers, you can use the Product Search or Product Projection 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 Search Term 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 you retrieve product information using the Products API or Product Projections API before indexing is complete, the product data in the search index might be different. The search index is automatically updated whenever Products are changed.
FunctionalityProduct SearchProduct Projection Search
Indexed projection of the Productscurrentcurrent and staged
Support for Variant-level Attributesvariants.attributes.<attribute-name> expression, up to 50 Attributes per Product Variantfilter by Attribute values
Support for Product-level Attributesattributes.<attribute-name> expression, up to 50 Attributes per Product Variant-
Support for Standalone Pricesfor sorting, filtering, and faceting, up to 10 000 Standalone Prices per Product-
Support for validity periods of Pricesvariants.prices.* keyword fields-
Support for Storesstores keyword field, up to 15 000 Stores per Product-
Support for Product SelectionsproductSelections keyword field, up to 15 000 Product Selections per Product-
Support for Product Tailoring--

Query expressions

FunctionalityProduct SearchProduct Projection Search
Full-text searchfullText expressiontext.{language} query parameter
Fuzzy searchfuzzy expression BETAfuzzy and fuzzyLevel query parameters
Exact matchexact expressionfilter and filter.query query parameters
Range of valuesrange expression{from} to {to} operator on filters
If field existsexists expressionexists and missing operators on filters
Prefix matchprefix expression-
Wildcard matchwildcard 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 defaultembedded in the returned Product Projection
Full representations of the matching Productswith GraphQLby default
Price selection-with query parameters
Scoped Price search-with query parameters

Filtering

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

Faceting

FunctionalityProduct SearchProduct Projection Search
Count all occurrences of distinct values.distinct facetsterm facets
Count Products that have values within a specified range.ranges facetsrange facets
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.scope of facetsfilter or filter.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-