Sort Options Group
Sort options are different ways in which you can request the results to be sorted. By default results are sorted by relevance (i.e: most relevant items to the query in question come first), but you can choose to sort them by price or any other property. To set up custom sort options for your dataset, please reach out to support@constructor.io.
#
Sort options structure#
Sort options fieldsfield_name | Always present? | Description |
---|---|---|
sort_by | Yes | The name of the attribute results will be sorted by. The value of this field should be passed to the sort_by query string parameter in the browse request when this option is selected. |
sort_order | Yes | Either "descending" or "ascending" . The value of this attribute should be passed to the sort_order query string parameter in the browse request when this option is selected. |
display_name | Yes | The user-friendly name of this sort option that should be displayed to users. |
status | Yes | "selected" if this option is selected in the current browse request, empty string ("" ) otherwise. |