Search module
The Search module exposes Bloomreach Commerce Search's core functionality, delivering the most relevant results from your product catalog to every visitor of your site. This module includes web services, a JavaScript API, and sample code.
Web services
The core functionality of Bloomreach search is exposed through JSONP web services. While you can integrate directly with the web services, you might find it more convenient to work with a JavaScript API.
JavaScript API
By adding a Bloomreach-hosted JavaScript library to your site (br-mob.js), you have access to a jQuery plugin that takes care of the legwork to communicate with JSONP web services. There's no need to worry about constructing correctly-formatted requests, implementing padding functions, or parsing serialized data.
The API needs just these items:
- Search parameters encoded in a URL
- Callback function defined to provide a list of results and available filters
Sample code
Bloomreach provides sample code for the implementation of the JavaScript API. The sample code performs the following functions:
- Changes the URL without having to load a new page by using the HTML5 History API to connect the Autosuggest Module with the Search Module.
- Replaces the previous content with Bloomreach search results by rendering the results to a new element on the page with the callback function.
This configuration of the JavaScript API pulls data from one of Bloomreach's dedicated servers.
What are you interested in today?
- Search dependencies provides a list of items you need for a client-side search integration, and includes sample code for search page footers.
- Search client-side configuration describes the parameters in the searchConfig file, which holds your configuration information for client-side search integrations.
- Structuring a search page provides sample code for use cases that install the search plugin and configure how to render products, filters, and sorts.
- Configuring your site's user experience provides sample code for use cases that you might choose to configure for usability and general user experience.
- Sample CSS for search provides a sample CSS for your Search plugin.