以下代码使用Microsoft Graph API搜索OneDrive .
List<DriveItem> items = graphServiceClient
.getMe()
.getDrive()
.getRoot()
.getSearch("abc")
.buildRequest()
.get().getCurrentPage();
此代码返回与 Headers 匹配的所有文件和文件夹(也可能是文档中的内容)“abc” .
如何限制搜索结果以仅获取与 Headers “abc”匹配的文件?
Edit
请在以下情况投票支持此功能请求
1 回答
目前还没有't a way to restrict the search target to just the title at this point. At this time, you'll需要对结果进行客户端过滤 . 请在Office Developer Platform UserVoice页面打开功能请求 . 从这篇文章链接到它,以便其他人可以找到并投票 .