Facets Structure
#
Facets fieldsfield_name | Always present? | Description |
---|---|---|
name | Yes | The name of the facet. This should be passed in the filters parameter when a facet of this type is selected. filters[name]=value |
display_name | Yes | The display name of the facet. This can be used for displaying the facet name, but it's not necessarily the value that needs to be passed in filters . |
type | Yes | Either "single" , "multiple" , or "range" . If a facet is of type single , then only one of the options may be selected (e.g: display as radio button). If the type is multiple , then multiple options may be selected (e.g: display as checkboxes). If the type is range , then no options are provided. Instead a min and max value is provided to specify the range of values that can be sent in filters . To configure the types of your facets, please reach out to support@constructor.io. |
status | No | Object containing min and max values. Only provided at the facet field level for facets of type range . Specifies the currently selected range. If no range is currently selected, status will be an empty object ({} ) |
options | No | The list of possible facet values matching this browse request. Only provided if type is single or multiple . By default, facet options are sorted by relevance. To configure the sort order of your facet options, please reach out to support@constructor.io. |
data | Yes | Object containing custom data associated with this facet. An empty object ({} ) if no data is currently associated with this facet. If you need help associating custom data with your facets, please reach out to support@constructor.io. |
#
Facet option fieldsfield_name | Always present? | Description |
---|---|---|
value | Yes | The value that should be passed in filters to select this option: filters[name]=value |
display_name | Yes | Display name of the facet option. This can be used for displaying the facet option, but it's not necessarily the value that needs to be passed in filters |
status | Yes | "selected" if this option is selected in the current browse request, empty string ("" ) otherwise. |
data | Yes | Object containing custom data associated with this facet option. An empty object ({} ) if no data is currently associated with this option. If you need help associating custom data with your facet options, please reach out to support@constructor.io. |
count | Yes | Number of items in the current browse that match this option. |