Auto Paginating Search Results in Box Windows SDK V2

新規投稿

コメント

1件のコメント

  • mwiller

     There is not currently a way to pull all search results; the recommended approach is to ask for as many as you need and then page through the results until you find what you're looking for.  Here's an example of one approach you might take:

     

     

    var pageSize = 30; // number of results per page, maximum 200
    var offset = 0;
    var query = "Your Search Query";
    var limit = 500; // total number of search results to retrieve while (pageSize + offset <= limit) // search through the first 500 total results { var results = await client.SearchManager.SearchAsync(query, offset: offset, limit: pageSize); if (/* you found what you wanted in the results */) { break; } offset += pageSize; }

     

     

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。