1. Search resources

Sorting resource

The Sorting Resource is a json resource that contains the information related to the sorting of the current search results:

NameTypeDescription
propertiesObjectA dictionary object containing the properties and values. If a sorting was already applied on the search results, properties include title of the sorting configuration and the order.
ascendingSearch LinkA hyperlink to the Search resource with results sorted in ascending order. Present only if a sorting was already applied on the search.
descendingSearch LinkA hyperlink to the Search resource with results sorted in descending order. Present only if a sorting was already applied on the search.
sort_optionsArrayAn array of search links representing the options for the sorting of the search results that the user can choose among.

Example:

{
    "properties": {
        "title": "Title",
        "order": "ascending"
    },
    "ascending": {
         "href":"http://<hostname>/api/search?q=myQueryForAscending&skip=20&take=10"
    },
    "descending": {
        "href":"http://<hostname>/api/search?q=myQueryDescending&skip=20&take=10"
    },
    "sort_options": [
        The array of sort options search links

    ]
}
If you have suggestions for improving this article, let us know!