Search client
The SDK provides a Search client to execute searches.
Note
In the following code example, the client variable refers to the ContentHubClient instance. When using the JavaScript SDK, you can choose your own variable name, but it is called client at instantiation in the documentation.
Search for assets
For example, the following snippet searches for assets:
RequestResponse
const request = new SearchRequest({
componentId: 9815,
query: "",
culture: "en-US",
searchDefaults: "SearchConfiguration",
fieldFilters: [],
fullTextFilters: [],
take: 20,
skip: 0,
});
const result = await client.search.searchAsync(request);