Home > @yext/search-core > SortBy
Represents a criterion that can be used to sort results.
Signature:
export interface SortBy
Overrides the sort options that are configured on the experience configuration.
Property | Type | Description |
---|---|---|
direction? | Direction | (Optional) The direction of the sort. Required if the SortBy type is SortType.Field. |
field? | string | (Optional) The field name to sort by. Required if the SortBy type is SortType.Field. |
type | SortType | The method of sorting. |