Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (23 sloc) 1.17 KB

Search

Different examples of search which have been implemented in the example SearchExamplesAsAppUser.java

For more information refer to the Search API documentation.

Search

A search can be performed in your Box instance with specified starting position with [searchRange(long offset, long limit, BoxSearchParameters queryParams)][search]

You can use the limit and offset parameters to page through the search results.

// Find the first 10 files matching "taxes"
long offsetValue = 0;
long limitValue = 10;
BoxSearch boxSearch = new BoxSearch(api);
searchParams.setQuery("taxes");
searchParams.setType("file");
PartialCollection<BoxItem.Info> searchResults = boxSearch.searchRange(offsetValue, limitValue, searchParams);