【发布时间】:2020-01-27 23:35:36
【问题描述】:
我们正在构建具有分页功能的自定义 Web 部件。为了实现此功能,我们获取总行数并显示可能的页数。
在实现这一点时,我们正在使用 startRow 和 rowLimit 查询字符串参数运行查询。当我更改 startRow 查询字符串参数时,TotalRows 属性为相同的 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
但是 TotalRowsInclusingDuplicates 属性返回一个一致的值。但是,如果我尝试使用 TotalRows 计数之上的起始行,它会返回 0 个结果。
我想知道为什么 StartRow 会改变行数。
有人遇到同样的问题或有什么建议吗?
【问题讨论】:
标签: sharepoint-online sharepoint-search sharepoint-rest-api