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 Search versus Product Projection Search
The following comparisons can help you choose the API that best fits your needs.
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.
Functionality | Product Search | Product Projection Search |
---|---|---|
Indexed projection of the Products | current | current and staged |
Support for Standalone Prices | for sorting, filtering, and faceting | - |
Support for validity periods of Prices | variants.prices.* keyword fields | - |
Support for Stores | stores keyword field | - |
Support for Product Selections | productSelections keyword field | - |
Support for Product Tailoring | - | - |
Query expressions
Functionality | Product Search | Product Projection Search |
---|---|---|
Full-text search | fullText query expression | text.{language} query parameter |
Fuzzy search | fuzzy and fuzzyLevel query parameters | |
Exact match | exact query expression | filter and filter.query query parameters |
Range of values | range query expression | {from} to {to} operator on filters |
If field exists | exists query expression | exists and missing operators on filters |
Prefix match | prefix query expression | |
Wildcard match | wildcard query expression | |
Boosting particular searchable fields | boosting | |
Specify query expressions per searchable field | by field name | for filters, but not for full-text search |
Operators to define compound expressions | and , or , not , filter operators | Passing 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).
Functionality | Product Search | Product Projection Search |
---|---|---|
IDs of the matching Products | by default | |
Full representations of the matching Products | with ProductSearchProjectionParams BETA | by default |
Price selection | with ProductSearchProjectionParams BETA | with query parameters |
Scoped Price search | with query parameters |
Full-text search
Functionality | Product Search | Product Projection Search |
---|---|---|
Specific to different languages | ✓ | ✓ |
Allow to specify which Product fields should be taken into account. | ✓ |
Filtering
Functionality | Product Search | Product Projection Search |
---|---|---|
Filter by Category, Attribute values, Product Type, and Price. | ✓ | ✓ |
Faceting
Functionality | Product Search BETA | Product Projection Search |
---|---|---|
Count all occurrences of distinct values. | distinct facets | TermFacet |
Count Products that have values within a specified range. | ranges facets | RangeFacet |
Count the number of Products or Product Variants. | count facets | counting products parameter |
Allow for handling missing values when calculating facets. | missing values | |
Specify scope of facets. | scoping of facets | filter or filter.query query parameters |
Sorting
Functionality | Product Search | Product Projection Search |
---|---|---|
Sort order (ascending or descending) | asc and desc sort order | asc and desc sorting |
Sort mode to specify which value to sort on when Product contains multiple values for the field | min , max , avg , sum sort mode | asc.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 |