# Storefront search overview An overview of search-related features that enhance product discoverability through your storefront. To create performant storefront product search experiences for your customers, you can use the [Product Search](https://docs.commercetools.com/api/projects/product-search.md) or [Product Projection Search](https://docs.commercetools.com/api/projects/product-projection-search.md) 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](https://docs.commercetools.com/api/storefront-search-overview.md#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](https://docs.commercetools.com/api/projects/search-term-suggestions.md). ## 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 you retrieve product information using the [Products API](https://docs.commercetools.com/api/projects/products.md) or [Product Projections API](https://docs.commercetools.com/api/projects/productProjections.md) before indexing is complete, the product data in the search index might be different. The search index is automatically updated whenever Products are changed. (a CSV formatted table follows. The first line are the column names.) Functionality,Product Search,Product Projection Search Indexed projection of the Products,current,current and staged Support for Variant-level [Attributes](https://docs.commercetools.com/api/projects/products.md#attribute),`variants.attributes.` [expression](https://docs.commercetools.com/api/projects/product-search.md#attributes), up to 50 Attributes per Product Variant,[filter by Attribute values](https://docs.commercetools.com/api/projects/product-projection-search.md#filter-by-attribute-values) Support for Product-level [Attributes](https://docs.commercetools.com/api/projects/products.md#attribute),`attributes.` [expression](https://docs.commercetools.com/api/projects/product-search.md#attributes), up to 50 Attributes per Product Variant,- Support for [Standalone Prices](https://docs.commercetools.com/api/projects/standalone-prices.md),for [sorting, filtering, and faceting](https://docs.commercetools.com/api/projects/product-search.md#prices), up to 10000 Standalone Prices per Product,- Support for validity periods of [Prices](https://docs.commercetools.com/api/types.md#price),`variants.prices.*` [keyword fields](https://docs.commercetools.com/api/projects/product-search.md#keyword-fields),- Support for [Stores](https://docs.commercetools.com/api/projects/stores.md),`stores` [keyword field](https://docs.commercetools.com/api/projects/product-search.md#keyword-fields), up to 15000 Stores per Product,- Support for [Product Selections](https://docs.commercetools.com/api/projects/product-selections.md),`productSelections` [keyword field](https://docs.commercetools.com/api/projects/product-search.md#keyword-fields), up to 15000 Product Selections per Product,- Support for [Product Tailoring](https://docs.commercetools.com/api/projects/product-tailoring.md),-,- ### Query expressions (a CSV formatted table follows. The first line are the column names.) Functionality,Product Search,Product Projection Search Full-text search,[fullText](https://docs.commercetools.com/api/search-query-language.md#fulltext) expression,`text.{language}` [query parameter](https://docs.commercetools.com/api/projects/product-projection-search.md#with-get) Fuzzy search,[fuzzy](https://docs.commercetools.com/api/search-query-language.md#fuzzy) expression,`fuzzy` and `fuzzyLevel` query parameters Exact match,[exact](https://docs.commercetools.com/api/search-query-language.md#exact) expression,`filter` and `filter.query` query parameters Range of values,[range](https://docs.commercetools.com/api/search-query-language.md#range) expression,`{from} to {to}` operator on [filters](https://docs.commercetools.com/api/projects/product-projection-search.md#filters) If field exists,[exists](https://docs.commercetools.com/api/search-query-language.md#prefix) expression,`exists` and `missing` operators on filters Prefix match,[prefix](https://docs.commercetools.com/api/search-query-language.md#prefix) expression,- Wildcard match,[wildcard](https://docs.commercetools.com/api/search-query-language.md#wildcard) expression,- Boosting particular searchable fields,[boosting](https://docs.commercetools.com/api/search-query-language.md#boost-query-results),- Specify query expressions per searchable field,[by field name](https://docs.commercetools.com/api/search-query-language.md#searchable-fields),for [filters](https://docs.commercetools.com/api/projects/product-projection-search.md#filters), but not for [full-text search](https://docs.commercetools.com/api/projects/product-projection-search.md#full-text-search) Operators to define compound expressions,`and`, `or`, `not`, `filter` [operators](https://docs.commercetools.com/api/search-query-language.md#compound-expressions),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](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fproduct-projections%2F%7Bid%7D%3AGET)). (a CSV formatted table follows. The first line are the column names.) Functionality,Product Search,Product Projection Search IDs of the matching Products,by default,embedded in the returned Product Projection Full representations of the matching Products,with [GraphQL](https://docs.commercetools.com/api/graphql.md#use-product-search),by default [Price selection](https://docs.commercetools.com/api/pricing-and-discounts-overview.md#price-selection),-,with [query parameters](https://docs.commercetools.com/api/projects/product-projection-search.md#with-get) [Scoped Price search](https://docs.commercetools.com/api/pricing-and-discounts-overview.md#scoped-price-search),-,with [query parameters](https://docs.commercetools.com/api/projects/product-projection-search.md#with-get) ### Full-text search (a CSV formatted table follows. The first line are the column names.) Functionality,Product Search,Product Projection Search Specific to [different languages](https://docs.commercetools.com/api/projects/product-search.md#supported-languages),✓,✓ Allow to specify which Product fields should be taken into account.,✓,- ### Fuzzy search (a CSV formatted table follows. The first line are the column names.) Functionality,Product Search,Product Projection Search [Fuzziness level](https://docs.commercetools.com/api/search-query-language.md#fuzziness-level) adjusts to term length automatically.,✓,- Allow to specify which Product fields should be taken into account.,✓,- ### Filtering (a CSV formatted table follows. The first line are the column names.) Functionality,Product Search,Product Projection Search Non-facet-driven filter (for example by Category, Attribute values, full-text search) that both results and every facet's base set inherit.,`query` in [ProductSearchRequest](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Atype%3AProductSearchRequest),`filter.query` Narrow the set of returned products after facets are calculated.,`postFilter` in [ProductSearchRequest](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Atype%3AProductSearchRequest),`filter` Narrow the calculated facet results.,`filter` in facet expressions,`filter.facets` ### Faceting (a CSV formatted table follows. The first line are the column names.) Functionality,Product Search,Product Projection Search Count all occurrences of distinct values.,[distinct facets](https://docs.commercetools.com/api/projects/product-search.md#distinct-facets),[term facets](https://docs.commercetools.com/api/projects/product-projection-search.md#term-facets) Count Products that have values within a specified range.,[ranges facets](https://docs.commercetools.com/api/projects/product-search.md#ranges-facets),[range facets](https://docs.commercetools.com/api/projects/product-projection-search.md#range-facets) Count the number of Products or Product Variants.,[count facets](https://docs.commercetools.com/api/projects/product-search.md#count-facets),[counting products](https://docs.commercetools.com/api/projects/product-projection-search.md#counting-products) parameter Calculate statistics for facet values.,[stats facets](https://docs.commercetools.com/api/projects/product-search.md#stats-facets),- Allow for handling missing values when calculating facets.,[missing values](https://docs.commercetools.com/api/projects/product-search.md#missing-values),- Filter facet results.,[filter facet](https://docs.commercetools.com/api/projects/product-search.md#filter-facet),[filtered facets](https://docs.commercetools.com/api/projects/product-projection-search.md#filtered-facets) Specify scope of facets.,[scope of facets](https://docs.commercetools.com/api/projects/product-search.md#scope-of-facets),`filter` or `filter.query` [parameters](https://docs.commercetools.com/api/projects/product-projection-search.md#filter-parameters) Assign a custom name to a facet result.,`name` in facet expression,`alias` extension ### Sorting (a CSV formatted table follows. The first line are the column names.) Functionality,Product Search,Product Projection Search Sort order (ascending or descending),`asc` and `desc` [sort order](https://docs.commercetools.com/api/search-query-language.md#sort-order),`asc` and `desc` [sorting](https://docs.commercetools.com/api/projects/product-projection-search.md#sorting) Sort mode to specify which value to sort on when Product contains multiple values for the field,`min`, `max`, `avg`, `sum` [sort mode](https://docs.commercetools.com/api/search-query-language.md#sort-mode),`asc.min`, `asc.max`, `desc.min`, `desc.max` for [sorting by values on Product Variants](https://docs.commercetools.com/api/projects/product-projection-search.md#sort-by-values-found-on-productvariants) Specify exactly which resources should be considered for sorting.,[sort filter](https://docs.commercetools.com/api/search-query-language.md#sort-filter),- Sort by a localized field, such as `name`,`language` property on the [sort object](https://docs.commercetools.com/api/projects/product-search.md#sort-by-standard-fields),dotted field path, such as `name.en` Sort by [CategoryOrderHints](https://docs.commercetools.com/api/projects/products.md#categoryorderhints),[structured sort object](https://docs.commercetools.com/api/projects/product-search.md#sort-by-categoryorderhints),string syntax, such as `"categoryOrderHints.{categoryId} asc"` ### Pagination (a CSV formatted table follows. The first line are the column names.) Functionality,Product Search,Product Projection Search Maximum results per page (`limit`),100,500 Maximum total results reachable through pagination,first 10000 results,first 10000 results Error when the offset exceeds the maximum,[InvalidInput](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Atype%3AInvalidInputError) error,`SearchExecutionFailure` error ## Related pages - [Section overview page](https://docs.commercetools.com/api.md) - [Next page: Product Search](https://docs.commercetools.com/api/projects/product-search.md)