2016-09-19 75 views
1

以下代碼使用Microsoft Graph API搜索OneDrive。僅使用Microsoft Graph API按標題搜索OneDrive文件

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

此代碼返回標題(和可能的內容也按照文件)「ABC」匹配所有文件和文件夾。

如何限制搜索結果以僅提取與標題「abc」匹配的文件?

編輯

請投票支持此功能要求AT-

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

回答

1

當前有不限制搜索目標,只是標題在這一點的方式。目前,您需要執行結果的客戶端過濾。請在Office Developer Platform UserVoice頁面打開功能請求。從這篇文章鏈接到它,讓其他人可以找到並投票它。

+0

謝謝@Michael。完成! https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/suggestions/16855591-microsoft-graph-api-search-onedrive-files-by-titl – nightlytrails

+0

謝謝@nightlytrails! –