microsoft-graph-api - 带有分页的 SharePoint Libraray 上的图形查询
问题描述
我有包含超过 5000 个文件的库使用时:
https://graph.microsoft.com/v1.0/sites/3a8180fe-ca21-40a8-81e6-0950f5966f07/lists/DPC Documents/Items?top=499&$expand=fields&$filter=fields/FileLeafRef eq '0100.009_Client Name_Physician Name_FMV Exhibits_466689.XLSX'
我收到错误“请求无法处理,因为它使用了太多资源”我可以要求分页吗?
BTW 等效的 SharePoint REST 调用返回“禁止尝试的操作,因为它超过了列表视图阈值。”
因此,无法在包含超过 5000 个项目的列表中查找项目。我注意到我无法在此类库中以编程方式发布主要版本。
我的 MS 不支持任何 API 来处理这个?
谢谢
解决方案
This is most probably due to the reason that you have more than 5000 files in the doc library and the filter column FileLeafRef is not indexed (you cannot add index this column either). I encountered same error when filtering with a custom metadata column but fortunately after adding the index to the column, the error went away. The only solution to your problem is not to use FileLeafRef as your filter column but use the Title column in the filter condition, after ensuring that Title column is populated with name of the document and the column is indexed.
推荐阅读
- html - 如何将有序列表的第一个和第二个孩子设置为具有相同的缩进?
- outlook - 防止 Outlook Mobile 自动创建不真实的链接
- php - Google oauth2 服务 api 密钥无效
- javascript - Javascript 对象选项:function 或 null
- seal - SEAL 代码中的刷新和有效性检查操作
- css - react-select V2 - 如何在 `isMulti` `ValueContainer` 上实现 `overflow-x: hidden`
- spring - TestExecutionListener 根本没有在听
- php - 使用 regExp 将电话号码转换为美国类型的电话号码也用于分机号码
- c# - 使用 SQL 命令从 C# 中的数据库中检索信息
- django - 在 django rest 框架中为 post 调用 save() 的问题