我正在尝试通过POST https://graph.microsoft.com/v1.0/search/query
. 我在请求正文中传递了entityType
as listItem
,以便我可以搜索 Sharepoint、Teams 和 Onedrive 文件。
但就我而言,我应该忽略 Onedrive 中的文件。
有没有办法过滤 OneDrive 文件并仅搜索 Sharepoint 和 Teams 文件?
OneDrive 文件https://contoso-my.sharepoint.com/
的 url 以 开头,SharePoint 文件的 url 以https://contoso.sharepoint.com/
.
所以你可以在这样的查询中添加过滤器来忽略 Onedrive 文件:
path:\"https://contoso.sharepoint.com/*\\"
参考:https : //docs.microsoft.com/en-us/graph/search-concept-files#example-5-use-filters-in-search-queries
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句