1. Search resources

Paging

The Paging Resource is a json resource that contains the information related to paging the current search results:

NameTypeDescription
propertiesObjectA dictionary object containing the properties and values. Properties include the current page number (1 based indexing) and the current page size.
nextSearch LinkA hyperlink to the Search Resource that displays the next page of search results (if a next page exists).
previousSearch LinkA hyperlink to the Search Resource that displays the previous page of search results (if a previous page exists).
firstSearch LinkA hyperlink to the Search Resource that displays the first page of search results (if it is not displayed already).
lastSearch LinkA hyperlink to the Search Resource that displays the last page of search results (if it is not displayed already).
page_sizesArrayAn array of search links representing the options for the number of search results per page that the user can choose among.
page_numbersArrayAn array of search links representing the options for the result pages the user can access by number.

Example:

{
   {
    "properties": {
        "current_page_size": 10,
        "current_page_number": 5
    },
    "last": {
        "query":"currentQuery",
        "href":"http://<hostname>/api/search?q=currentQuery&skip=200&take=10"
    },
    "next": {
        "query":"currentQuery",
        "href":"http://<hostname>/api/search?q=currentQuery&skip=50&take=10"
    },
    "previous": {
        "query":"currentQuery",
        "href":"http://<hostname>/api/search?q=currentQuery&skip=30&take=10"
    },
    "first": {
        "query":"currentQuery",
        "href":"http://<hostname>/api/search?q=currentQuery&skip=0&take=10"
    },
    "page_sizes": [
        {
            "query":"currentQuery",
            "href":"http://<hostname>/api/search?q=currentQuery&skip=0&take=5",
            "title": "5"
        },
        {
            "query":"currentQuery",
            "href":"http://<hostname>/api/search?q=currentQuery&skip=0&take=10",
            "title": "10"
        },
        {
            "query":"currentQuery",
            "href":"http://<hostname>/api/search?q=currentQuery&skip=0&take=50",
            "title": "50"
        }
    ],
    "page_numbers": [
        {
            "href":"http://<hostname>/api/search?q=currentQuery&skip=30&take=10",
            "title": "4"
        },
        {
            "href":"http://<hostname>/api/search?q=currentQuery&skip=40&take=10",
            "title": "5"
        },
        {
            "href":"http://<hostname>/api/search?q=currentQuery&skip=50&take=10",
            "title": "6"
        }
    ]
}
If you have suggestions for improving this article, let us know!