REST API StartRecord与StartRow属性 [英] REST API StartRecord versus StartRow property

查看:67
本文介绍了REST API StartRecord与StartRow属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我们的几个服务器场中注意到,当我尝试使用REST API递归查询术语并设置StartRow属性时,遇到500个项目的限制.

I've noticed in a couple of our farms that when I attempt to recursively query on a term using the REST API and setting the StartRow property that I encounter a 500 item limit.

例如: /_api/search/query?querytext ='TERM'& rowlimit = 100& startrow = 600

For example:  /_api/search/query?querytext='TERM'&rowlimit=100&startrow=600

返回0行,并在响应500中具有RowLimit值.

returns 0 rows and has a RowLimit value in the response of 500.

但是当我使用"StartRecord"进行调用时,我得到了预期的结果.相对于"StartRow":/_api/search/query?querytext ='TERM'& rowlimit = 100& startrecord = 600

But I get the expected results when I call with "StartRecord" versus "StartRow": /_api/search/query?querytext='TERM'&rowlimit=100&startrecord=600

如上所述,这发生在我们的4个发布场中,有两个使用相同的自定义代码构建.我们找不到这些服务器场之间的任何版本差异.

As stated this happens on 2 of our 4 Publishing farms, built with the same custom code.  We cannot find any build difference between these farms.

使用POST调用对后期查询终结点进行操作时,StartRecord属性不起作用.它仅适用于GET调用.

The StartRecord property does not work when using the POST call to postquery endpoint.  It only works with the GET call.

我找不到有关StartRecord属性的任何信息(我只是通过查看响应中的值来尝试它).这些农场是否缺少更新?为什么StartRecord不能工作,而StartRow不能工作?

I cannot find any information on the StartRecord property (I only attempted it by looking at the values in the response).  Are these farms missing an update?  Why does StartRecord work and StartRow does not?

谢谢

可乐

推荐答案

Croy,

经我测试, startrecord不是有效的Search Rest API参数,因此当使用startrecord过滤结果时,Search Rest API将自动忽略它,因此它将仅返回带有rowlimit参数的结果,因此将返回结果为 预期的.

As I tested,  startrecord is not a valid Search Rest API parameter, so when filtering the result with startrecord, Search Rest API will ignore it automatically, so it will only return the results with rowlimit parameter, so it will return result as expected.

对于startrow不返回结果,因为startrows将返回指定行的结果,例如,如果设置startrow = 600,它将从600行返回.

For startrow not return the results, as startrows will return the result with the row specified, for example, if set startrow=600, it will return from 600 row.

假设结果总行数少于600,并且使用startrow = 600,则不会返回任何结果,因为没有600行结果.

Suppose the result total row count is less than 600, using startrow=600, it won't return any result as there is no 600 row result.

有关SharePoint Search Rest API及其参数的更多信息,请检查:

More information about SharePoint Search Rest API and its parameter, please check:

https://docs.microsoft.com/en-us/sharepoint/dev/general-development/sharepoint-search-rest-api-overview

谢谢

最好的问候


这篇关于REST API StartRecord与StartRow属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆