Configuration Objects
Variables
The Variables is a simple key -> value pair object used for every search request. The proprties will vary based on your pipeline configuration but the most common implementations will use the following:
Value types can be string | string[] | number | boolean
.
Name | Type | Default | Description |
---|---|---|---|
|
|
| The search query. |
|
|
| |
|
|
| The autocomplete options for the search query. |
|
|
| Default filter to apply. |
|
|
| How many results to display per page. |
|
|
| Which page to display. |
|
|
| How many autocomplete suggestions per search. |
Config
The Config
object defines mapping between key/value pair params to be sent with each and every request.
Name | Type | Default | Description |
---|---|---|---|
|
|
| The key that includes a search query. |
|
|
| |
|
|
| The key that includes autocomplete options for the search query. |
|
|
| The key for how many results to display per page. |
|
|
| The key for which page to display. |
|
|
| The key for how many autocomplete suggestions per search. |
FieldDictionary
The FieldDictionary object is used to map fields in your data to the required fields to display in the UI. By default, the fields for a website search collection are used.
Name | Type | Default | Description |
---|---|---|---|
|
|
| Unique identifier for the record. |
|
|
| URL for the record, required for links in results. |
|
|
| The main title for the result. |
|
|
| The subtitle. Often a brand, category, or the URL. |
|
|
| A description to display beneath the title and subtitle. |
|
|
| An image, if applicable. |
|
|
| A price, if applicable. |
|
|
| An original price, if applicable. If the value is more than price (or it's index if price & originalPrice are both arrays) then the original price will be displayed (with |
|
|
| A rating, if applicable. |
Theme
The Theme object is used to set basic color options for the UI. Currently this is only for the primary actions.
Name | Type | Default | Description |
---|---|---|---|
|
|
| Set colors for primary actions. |
Custom Class Names
The customClassNames
property allows for adding CSS class names to components, enabling you to write custom styles to change the look and feel of the layout.
A list of components and available class names is available in the React Documentation.
To add custom classes, pass a configuration object with the class names to the customClassNames property.
Last updated