Sorting resource

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

Name

Type

Description

properties

Object

A 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.

ascending

Search Link

A hyperlink to the Search resource with results sorted in ascending order. Present only if a sorting was already applied on the search.

descending

Search Link

A hyperlink to the Search resource with results sorted in descending order. Present only if a sorting was already applied on the search.

sort_options

Array

An array of search links representing the options for the sorting of the search results that the user can choose among.

Example:

RequestResponse
{
    "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

    ]
}

Do you have some feedback for us?

If you have suggestions for improving this article,