The resourcesSearch function performs searches in the repository to find content that can be displayed by visualize.js.
This chapter contains the following sections:
• | Search Properties |
• | Search Functions |
• | Finding Resources |
• | Reusing a Search Instance |
• | Reusing Search Results |
• | Discovering Available Types |
Search Properties
The properties structure passed to the resourcesSearch function is defined as follows:
Search Functions
The resourcesSearch function exposes the following functions:
Finding Resources
The following code example shows how to perform a search and store the results in a variable:
The next two examples show different ways of handling results after making a simple repository search in the Public folder.
You can also specify the runImmediately:false parameter so that you can set up the search in the first call, and run it later in a separate call. In the following code sample, the first statement builds a query but makes no request to the server, and the second statement actually sends the request, which executes the query.
Reusing a Search Instance
If you make multiple searches, for example in different folders, you can create a function to do that using the ResourcesSearch function.
Reusing Search Results
Code example:
Discovering Available Types
You can write code to discover and display the types that can be searched and types of sorting that can be specified.
Recommended Comments
There are no comments to display.