Search Method
Searches for resources that match the specified query.
Syntax
public void search(String query);
Remarks
This method searches for resources that match the given Query, which the server will match against names, descriptions, file contents, etc.
Advanced searches can be performed by adding additional query parameters using the AddQueryParam method. Here are examples of some of the more common query parameters:
Query Parameter Name | Example Value | Description |
type | folder | Restrict results to resources of the given type. |
file_extensions | png,docx,pdf | Restrict results to files with one of the given extensions. |
ancestor_folder_ids | d:12345,d:0,d:67890 | Restrict results to resources within (recursively) one or more of the specified folders |
Calling this method will fire the ResourceList event once for each search result, and will also populate the Resources collection.
If there are still more search results available to list when this method returns, the SearchMarker property will be populated. Continue to call this method until SearchMarker is empty to accumulate all pages of results in the Resources collection.
The MaxSearchResults configuration setting can be used to control the maximum number of results to return at once.