We are a building a custom web part with pagination feature. To implement this feature we are getting a total rows count and showing the possible number of pages.
While implementing this, we are running queries using the startRow and rowLimit query string parameters. When I change the startRow query string parameter, the TotalRows attribute returns a different number for the same queryText.
Example:
https://tenant.sharepoint.com/_api/search/query?querytext='test'&startrow=0&rowLimit=10 returns TotalRows 125
https://tenant.sharepoint.com/_api/search/query?querytext='test'&startrow=10&rowLimit=10 returns TotalRows 112
But the TotalRowsInclusingDuplicates property returns a consistent value. However, If I try to use start row above the TotalRows count it returns 0 results.
I am wondering why Rows Count is varied by StartRow.
Is anyone facing the same issue or have any suggestions?