SharePoint Pagination using Index Doc Id does not allow sorting on Created on columns

Copper Contributor

Hi All,

We are using SharePoint Search API to get the items from SharePoint List.

 

We have a large dataset so we are following the below approach for pagination as mentioned in the MS Documentation below.

 

https://docs.microsoft.com/en-us/sharepoint/dev/general-development/pagination-for-large-result-sets

 

It is sorting on DocId.

But we also have to sort based on the created on Date, I am using below API.

 

API:

 

https://site/_api/search/query?querytext='test ListId:0ae14d29 indexdocid >10'&sortlist='refinabledate00:descending,[docid]:ascending'&rowlimit=10

 

 

but when I try to get results for page 2 it is not giving me the correct result. It gives the same set of records as on page 1.

 

If I retrieve records without createdOn sorting I am getting correct records but we want sorting based on date as well.

0 Replies