仅使用Microsoft Graph API按标题搜索OneDrive文件

时间:2016-09-19 18:45:21

标签: java android microsoft-graph onedrive

以下代码使用Microsoft Graph API搜索OneDrive。

List<DriveItem> items = graphServiceClient
    .getMe()
    .getDrive()
    .getRoot()
    .getSearch("abc")
    .buildRequest()
    .get().getCurrentPage();

此代码返回与标题匹配的所有文件和文件夹(也可能是文档中的内容)“abc”。

如何限制搜索结果以仅提取与标题“abc”匹配的文件?

修改

请在 -

投票支持此功能请求

https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/suggestions/16855591-microsoft-graph-api-search-onedrive-files-by-titl

1 个答案:

答案 0 :(得分:2)

目前还没有办法将搜索目标限制为此时的标题。此时,您需要对结果执行客户端过滤。请在Office Developer Platform UserVoice页面打开功能请求。从这篇文章链接到它,以便其他人可以找到并投票。