Search Component

Synopsis

Site search becomes more flexible when using Bloomreach Accelerator: B2C Commerce. The main idea is to delegate to system integrators which search backend to use. Moreover, the existing component is extensible: for example, developers can provide their own extensions to combine search result fetched from different systems.

Component Overview

The Search component is mainly responsible for retrieving data (e.g. products) from the backend systems. Based on your Bloomreach Accelerator: B2C Commerce configuration, you will be able to display product search results coming from the selected API.

In addition, the search result page supports faceted navigation: you will be able to filter the search results based on specific attributes.

Bloomreach Discovery is fully supported in case of Products API: functionalities like autosuggest and related products work out of the box.

Component Details

The Search component is a command chain delivery component. Currently, this component is able to interact with both Bloomreach API. All the connectors in the Default Commerce Connector Set provide the productSearch component, that is used by the Search Component. In addition, the connector configuration provides another component, called facetList, returning only the set of facets related to a query parameter. Most of the time, facets are part of the product search result, but in some case cases they may be fetched separately.

If the pageableCommand is part of the chain, the result returned by the backend will be paginated. In case of the search result page, pagination options (like page size and query limit) can be specified directly in the console.

Bloomreach API

The Search Component is fully compatible with Bloomreach APIs. In case you want enable this option, you need to check the related option in the Channel settings, as explained in the Bloomreach Configuration documentation page.

The Bloomreach Accelerator: B2C Commerce boot application already provides a Search Box component in the header. If the Bloomreach APIs option is enabled, you will automatically integrate with autocomplete and product suggestions while typing queries, as showed in the image below:

Facets are part of the products search result: the boot application provides a product-list template which is able to display both facets and products together. 

Template Details

The Bloomreach Accelerator: B2C Commerce boot application includes two types of template for product handling search results:

  • starterstore-productsearch.ftl in case you are only interested in displaying the product grid
  • starterstore-productlist.ftl in case you want to display facets and products in the same "section"

In addition, the boot application provides a template displaying only facet values:

  • starterstore-facetlist.ftl rendering facet values related to products matching a specific query

Extension Options

Since the Search Component is a command chain delivery component, any command extending the default behaviour can be added in the related commands definition. 

References

Bloomreach APIs: https://www.bloomreach.com/developer/api-catalogue

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?